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

system.verbs.builtins.op.listToOutline

on listToOutline (theList, adroutline) { <<4.2
	<<10/31/97 at 12:07:54 PM by DW -- moved from toys.listToOutline
	local (oldtarget = target.get (), dir = down);
	target.set (adroutline);
	on insertList (theList) {
		local (i, elem);
		for i = 1 to sizeof (theList) {
			elem = theList [i];
			if typeOf (elem) == listType {
				dir = right;
				insertList (elem);
				if dir == down {
					op.go (left, 1)}}
			else {
				op.insert (elem, dir); dir = down}}};
	insertList (theList);
	target.set (oldtarget);
	return (theList)}
<<bundle <<test code
	<<try {delete (@scratchpad.xxx)}
	<<scratchpad.theList = op.outlineToList (@tablemap.thelist)
	<<new (outlinetype, @scratchpad.xxx)
	<<target.set (@scratchpad.xxx)
	<<listToOutline (scratchpad.theList, @scratchpad.xxx)
	<<op.firstSummit ()
	<<op.deleteLine ()
	<<edit (@scratchpad.xxx)



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.