Monday, November 08, 2010 at 12:02 AM.
system.verbs.builtins.Frontier.tools.getInfoTable
on getInfoTable () { <<Return a table containing info about the Tools in the Tools folder. Each Tool gets a sub-table whose name is the filename of the Tool. Each sub-table contains: <<f -- the path on disk <<flEnabled -- whether it's enabled or not <<flInstalled -- whether it's installed or not <<flOpen -- whether the gdb is open or not <<01/08/01; 1:15:30 PM by PBS local (f, folder = Frontier.tools.getToolsFolderPath ()); local (infoTable); new (tableType, @infoTable); fileloop (f in folder) { local (fname = file.fileFromPath (f)); local (shortName = string.popSuffix (fname)); local (adrItem = @infoTable.[fname]); new (tableType, adrItem); adrItem^.f = f; adrItem^.flOpen = defined ([f]); adrItem^.flEnabled = false; //default adrItem^.flInstalled = false; //default bundle { //is the Tool installed? if defined (user.tools.databases.[shortName].flInstalled) { adrItem^.flInstalled = user.tools.databases.[shortName].flInstalled}}; bundle { //is the Tool enabled? if adrItem^.flOpen { if Frontier.tools.isEnabled (f) { adrItem^.flEnabled = true}}}}; return (infoTable)}
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.