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

system.verbs.builtins.Frontier.tools.installNewTools

on installNewTools () {
	<<Install any new Tools in the Tools folder. Return a list of file paths of any new Tools that were installed.
		<<01/06/01; 3:37:49 PM by PBS
		<<Changes:
			<<2/24/01; 2:19:45 PM by PBS
				<<If a tool does not have a table in user.tools.databases, create it. This prevents opening and closing disabled tools every 10 seconds, which interrupts typing and causes screen flashing.
	
	local (newTools = {});
	local (toolsFolder = Frontier.tools.getToolsFolderPath ());
	local (f);
	fileloop (f in toolsFolder) {
		local (fname = file.fileFromPath (f));
		local (shortName = string.popSuffix (fname));
		if string.lower (fname) endsWith ".root" {
			if not (defined ([f])) { //is it a new tool?
				if not defined (user.tools.databases.[shortName]) {
					if Frontier.tools.isEnabled (f) {
						Frontier.tools.install (f);
						newTools = newTools + f}
					else { //PBS 02/24/01: set up table for this tool; this prevents opening it every 10 seconds
						local (adrTable = @user.tools.databases.[shortName]);
						local (t);
						new (tableType, @t);
						t.flInstalled = false;
						t.lastModified = file.modified (f);
						t.path = f;
						adrTable^ = t}}}}};
	
	return (newTools)} //list of file paths of new Tools installed



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.