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

on assureIndex (indexName=nil) {
	local (indexPath = (indexName));
	if defined ([indexPath]) { //is Index.root already open?
		return (true)};
	if file.exists (indexPath) { //does Index.root exist? (indexPath, true); //it does, open it
		return (true)};
	<<Create a new Index.root. (indexPath);
	window.hide (@[indexPath]);
	new (tableType, @[indexPath].pageInfo);
	new (tableType, @[indexPath].index); (indexPath);
	return (true)}

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.