From: John G. <jge...@ny...> - 2001-04-05 23:22:16
|
> Hello, > I've searched the mailing list archives but didn't find any mention of this so here goes : > The Macros guide says the functions contained in the Startup macro are made available to all > other macros. > Does this apply to global variables and macros called using runScript as well ? > My idea is to develop lightweight plugins using macros, and being able to rely on some > global namespace would be quite helpful. > I suspect a call to : > BeanShell.runScript( > view > ,"myscripts/plugin.bsh" > ,false // Use same namespace as the > // startup macro > ,true); > Would do the job, but if not, are there any plans to provide such a functionality ? I > suspect providing a global namespace (including variables) for all macros to use would not > be too difficult. > Cheers > Brice The BeanShell implementation will import variables from the startup macro into the global interpreter namespace. It also allows macros to be chained to the startup macro, with similar effect. I'm posting some demonstration scripts at jEdit Macro Central. John |