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


on buildOutline (adrtable, adroutline) {
	local (oldtarget = target.get ());
	new (outlinetype, adroutline);
	target.set (adroutline);
	edit (adroutline);
	local (dir = down);
	on traverse (adrtable) {
		local (s);
		s = string (adrtable) + "." + html.getPref ("defaultFileName");
		if firstline {
			op.setLineText (s);
			firstline = false}
		else {
			op.insert (s, dir)};
		local (adrsubitem, i);
		for i = 1 to sizeof (adrtable^) {
			adrsubitem = @adrtable^ [i];
			msg (adrsubitem);
			if html.traversalSkip (adrsubitem) {
			if nameOf (adrsubitem^) == html.getPref ("defaultFileName") {
			if typeOf (adrsubitem^) == tableType {
				traverse (adrsubitem)} <<recurse
			else {
				op.insert (adrsubitem, dir)};
			rollBeachBall ()}};
	local (firstline = true);
	traverse (adrtable);
	op.firstSummit ();
	target.set (oldtarget);
	return (true)};
bundle { <<test code
	buildOutline (@user.websites.midas, @user.websites.midas.["#nextPrevs"])}

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.