Monday, November 08, 2010 at 12:02 AM.
system.verbs.builtins.fatPages.unpackFileObject
on unpackFileObject (adrAtts, path, flRunnable=false) { local (objectType, data); objectType = fatPages.getObjectType (adrAtts); if not objectType { fatPages.noObjectError (path)}; data = fatPages.decode (@adrAtts^.pageData); delete (@adrAtts^.pageData); //we're done with it, free memory now setBinaryType (@data, objectType); local (alreadyOpen = defined ([path])); if alreadyOpen { if flRunnable { scriptError ("\"" + file.fileFromPath (path) + "\" is already running.")} else { window.bringToFront (path)}; return (true)}; unpackWindow (@data, path); if flRunnable { //it's a desktop script <<File-based, runnable desktop script system.deskscripts.path = path; [path] (); window.close (path)} else { //it's not a desktop script <<File-based window window.show (path); window.bringToFront (path)}; return (true)}
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.