Monday, November 08, 2010 at 12:02 AM.
system.verbs.builtins.export.card.startCard
<<Changes <<3/18/04; 3:21:05 PM by JES <<Pop the file-part from the address before exporting. Improves portability of exported objects. local (lastkind, lastlocation, lastcompression); bundle { <<Sat, Sep 21, 1996 at 8:07:58 AM by DW, made it smarter for user local (adr = user.export.lastaddress); lastkind = "Packed object"; <<default if typeOf (adr^) == scriptType { if parentOf (adr^) == @system.deskscripts { lastkind = "Desktop script"} else { if script.getLanguage (adr) == "AppleScript" { lastkind = "Script Editor format"}}}; lastlocation = "File"; lastcompression = "None"}; <<lastkind = user.export.lastkind <<lastlocation = user.export.lastlocation <<lastcompression = user.export.lastcompression bundle { <<set up the Kind popup local (s, checkeditem); s = "Packed object;Desktop script;Folder;Script Editor format;"; card.popup.setmenu ("kind", s); checkeditem = 1; for i = 1 to string.countFields (s, ';') { name = string.nthfield (s, ';', i); if name == lastkind { checkeditem = i; break}}; card.popup.setcheckeditem ("kind", checkeditem)}; bundle { <<set up the Location popup local (s, checkeditem); s = "File;Eudora attachment;"; card.popup.setmenu ("location", s); checkeditem = 1; for i = 1 to string.countFields (s, ';') { name = string.nthfield (s, ';', i); if name == lastlocation { checkeditem = i; break}}; card.popup.setcheckeditem ("location", checkeditem)}; bundle { <<set the compression radio button local (s = lastcompression); card.setobjectflag ("none", s == "None"); card.setobjectflag ("sit", s == ".sit"); card.setobjectflag ("sithqx", s == ".sit.hqx")}; card.setobjecttext ("address", string.popFileFromAddress (user.export.lastaddress))
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.