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


on installApp (appRoot) {
	<<Install one app in the Guest Databases/apps/ folder.
		<<appRoot is the name of the gdb, as in mainResponder.root or manila.root.
		<<This script:
		<<1) Open the gdb if it's not open.
		<<2) Creates an entry in user.databases.
		<<3) Runs the startup script.
			<<10/26/99; 6:18:10 PM by PBS
	local (f = Frontier.getSubFolder ("apps") + appRoot);
	if not defined ([f]) { (f, true)}; //open it hidden
	<<Add an entry to the user.databases table.
	local (adrTable = @user.databases.[appRoot]);
	new (tableType, adrTable);
	adrTable^.f = f;
	adrTable^.openOnStartup = true;
	adrTable^.runStartupScript = true;
	adrTable^.supportsSubscribe = false;
	<<Run the startup script.
	adrStartupScript = @[f].["#startup"];
	if defined (adrStartupScript^) {
		adrStartupScript^ ()}; //run the startup script
	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.