Reset Locals?
Jim Ault
JimAultWins at yahoo.com
Thu Jul 6 01:41:41 EDT 2006
> I'm still curious though... I seem to remember seeing this on the list many
> many moons ago: is there a way to access the local variables of a script
> from outside the script? Something like:
>
> get the myCoolVar of script of btn 2
>
> Was I dreaming or is this possible?
The only way I know to move/create the 'global' scope is store the variable
in a button, card or stack property, then refer to it the usual way
get the cpMyCoolStoredVarThatCanBeSavedWithTheStack of btn 2 of ....
Once a handler dies, all the constructs supported by it should die.
As soon as I post this Ken or somebody will show there is a way that uses a
shell command + a DLL registry call + a libURL undocumented feature :-)
Jim Ault
Las Vegas
On 7/5/06 10:11 PM, "Scott Rossi" <scott at tactilemedia.com> wrote:
> Recently, Jim Ault wrote:
>
>>> Is this correct? Do we really need to set the script to itself (or another
>>> script) to reset the variables?
>
>> This should work in all versions
>> (I use 'z' for my globals so they get listed at the bottom of variable
>> watcher)
>
> Thanks Jim -- that gives me an idea.
>
> I'm still curious though... I seem to remember seeing this on the list many
> many moons ago: is there a way to access the local variables of a script
> from outside the script? Something like:
>
> get the myCoolVar of script of btn 2
>
> Was I dreaming or is this possible?
More information about the use-livecode
mailing list