Monday, November 08, 2010 at 12:04 AM.
system.verbs.builtins.op.newOutlineObject
on newOutlineObject (s, adr) { <<8/16/98; 11:40:55 AM by DW <<New for 5.1.3, creates a new outline object at the specified address. <<The text is assumed to be tab-indented, <<We take advantage of the fact that op.insert knows how to deal with this kind of text. <<Parallel to wp.newTextObject. if not defined (adr^) { new (outlinetype, adr)} else { if typeof (adr^) != outlinetype { new (outlinetype, adr)}}; local (oldtarget = target.set (adr)); op.wipe (); op.insert (s, down); op.firstSummit (); op.deleteLine (); try {target.set (oldtarget)}; return (true)}; bundle { //test code op.newOutlineObject (clock.now () + "\r\tone\r\ttwo\r\tthree\r\tfour\r", @scratchpad.testoutline)}
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.