Monday, November 08, 2010 at 12:02 AM.
system.verbs.builtins.fatPages.unpackOdbObject
on unpackOdbObject (adrAtts, adrDest, path=nil, flRunnable=false, flEdit=true) {
local (data, objectType);
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);
table.surePath (adrDest);
unpack (@data, adrDest); //unpack the data
delete (@data); //we're done with it, free memory
if flRunnable { //it's a desktop script
local (wasDefined);
system.deskscripts.path = path; //make path available to the script
wasDefined = defined (adrDest^);
adrDest^ (); //It's runnable. Run the script.
if not wasDefined {
delete (adrDest)}}
else { //it's not a desktop script
if parentOf (adrDest^) == @suites {
system.menus.buildSuitesSubMenu ()};
if flEdit {
edit (adrDest)}};
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.