I've run into a hitch while trying to move all the core script into functions
[1].  The problem is where the 'eval' function puts the results when evaluating
functions.  When they are done at global scope (as they are currently), the
functions are accessible in the global namespace.  When the eval is performed in
a function, the resulting functions are not visible globally.

The solution I've come up so far is to parse the script as it is read in, and
modify the functions as such:

gg = function _gg(...)
{ ... }

This assigns a global variable (gg) to the local function, which allows the
local function to be referenced globally.

In more ideas out there?

Glenn



[1] I'm moving the global code into function in order to be able to
control/delay when the actual work is done when starting up the toolbar.
Currently, a lot of script is executed when it is loaded simply because its
scope is global.



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
DQSD-Devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dqsd-devel

Reply via email to