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

system.verbs.builtins.table.sureDatabaseOpen

on sureDatabaseOpen (adr) {
	<<Make sure the database containing this address is open.
		<<It could be an address in the Frontier.root or in a guest database.
	if defined (adr^) {
		return (true)}; //the address is already defined
	
	local (x = string.parseAddress (string (adr)));
	local (f = x [1]);
	
	if defined ([f]) {
		return (true)}; //the guest database or containing table is defined
	
	if file.exists (f) {
		return (fileMenu.open (f))}; //the guest database exists, open it
	
	scriptError ("Can't open \"" + f + "\" because the database doesn't exist.")}



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.