Subj : Re: recursion errors
To : Rastus
From : echicken
Date : Fri Jan 03 2014 11:28 am
Re: Re: recursion errors
By: Rastus to Nightfox on Mon Dec 30 2013 15:20:04
Ra> bbs.exec("?Space_Menu.js");
This runs "Space_Menu.js" in its own scope, meaning that (likely) won't have
access to variables or functions defined in the script that called it.
Ra> load("Space_Menu.js");
This loads "Space_Menu.js" into the scope of the script that's currently
running. (If it helps, you can think of it as essentially appending the
contents of "Space_Menu.js" to the current script. That may give you some
ideas as to how "Space_Menu.js" is able to reference or modify variables and
functions defined in the parent script.)
Which of these is best to use depends on the design of your module.