Monday, November 08, 2010 at 12:04 AM.


	<<5/20/09; 1:05:48 PM by DW
		<<Make the folder something you can set in user.prefs, so if you want the objects saved to a different folder, you can have it do that.
	<<2/18/09; 10:38:16 AM by DW
		<<Les Orchard, in a comment, said he couldn't remember how to export an object, which is fair because there is no UI for it in the OPML Editor. That's ridiculous. I added a call to this as a command to the Misc menu.
opmlEditor.init (); //5/20/09 by DW
local (folder = user.opmlEditor.prefs.exportFolder); //5/20/09 by DW
local (adr = table.getcursoraddress (), suffix = Frontier.getFileSuffix (typeOf (adr^), true));
if suffix != "" {
	suffix = "." + suffix};
s = nameof (adr^);
adrParent = parentOf (adr^);
if adrParent != nil {
	if (not table.inguestdatabase (adr)) or (adrparent != table.getrootaddress (adr)) {
		local (dottedname = nameOf (adrParent^) + '.' + s);
		if (sizeof (dottedname) + sizeof (suffix) + 1) < 32 {
			s = dottedname}}};
local (f = folder + s + suffix);
if dialog.confirm ("Export \"" + f + "\"?") {
	file.surefilepath (f);
	export.sendobject (adr, f);
	file.openfolder (folder)}

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.