Strict Compile Mode
Bob Sneidar
bobs at twft.com
Fri Oct 12 12:35:25 EDT 2012
Read my other post on this. If you want it to be visible only to your stack, store it in a property, then write a function called getGlobal() (or something like) and pass it a local variable name as a reference. Have the function retrieve the global in the referenced variable. You will also have to have a setGlobal() function (or something like).
Bob
On Oct 12, 2012, at 9:29 AM, Peter Haworth wrote:
>> Hi Pete,
>>
>> if you declare a variable "global",the variable IS GLOBAL FOR ANY STACK
>> and is "*persistent*". This means that the variable and its value exist
>> regardless of the stack that created. If you liketo see do just a simple
>> test ...
>>
>
> Wow, so a global declared in one stack can be accessed by a completely
> different stack, even if the declaring stack is not in memory. That seems
> like a recipe for potential disaster, especially if you are writing plugins
> that are used by customers to access their own stacks.
More information about the use-livecode
mailing list