Monday, November 08, 2010 at 12:00 AM.
scripting2Suite.editor.openEditWindow
on openEditWindow (urlToEdit) { <<Changes <<7/12/10; 8:56:44 AM by DW <<Decode the title to change " to ". <<6/23/10; 6:06:36 PM by DW <<Add optional parameter, urlToEdit. <<6/1/10; 10:27:45 AM by DW <<Created. local (adrdata = scripting2Suite.init ()); local (adrbuttons = @scripting2Suite.editor.buttons.editWindow); local (adrtable = @system.temp.scripting2.editor.posts.[urlToEdit], adroutline); if not defined (adrtable^) { new (tabletype, adrtable)}; adroutline = @adrtable^.outline; if not window.isopen (adroutline) { local (opmltext = tcp.httpreadurl (urlToEdit), title); if not defined (adroutline^) { op.xmltooutline (opmltext, adroutline)}; bundle { //get the title local (xstruct); on decode (s) { return (xml.entitydecode (s, true))}; xml.compile (opmltext, @xstruct); local (adropml = xml.getaddress (@xstruct, "opml")); local (adrbody = xml.getaddress (adropml, "body")); local (adrsummit = xml.getaddress (adrbody, "outline")); title = decode (xml.getattributevalue (adrsummit, "text")); title = "scripting2: " + title}; edit (adroutline, adrButtonTable:adrbuttons, windowtitle:title); scripting2Suite.editor.setEditWindowAttributes (adroutline, title:title)} else { window.bringtofront (adroutline)}}; bundle { //test code openEditWindow ("http://scripting.com/stories/2010/06/23/howEditThisPageWillWorkInS.opml")}
This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.