Reset Locals?
Trevor DeVore
lists at mangomultimedia.com
Thu Jul 6 07:47:42 EDT 2006
On Jul 5, 2006, at 9:42 PM, Scott Rossi wrote:
> Thanks, but this doesn't seem to be the case here (OSX 10.3.9, Rev
> 2.7.2).
>
> New stack/button script:
>
> local myCheck
> on mouseUp
> if myCheck = "" then
> put 5 into myCheck
> else put 2 into myCheck
> answer myCheck
> end mouseUp
>
> After the first "check", the value of myCheck is consistently 2,
> even when
> the script is edited. Rev says the preserveVariables is false.
>
> In previous versions (for me), any time the script is edited, the
> local is
> reset. I just checked with 2.6.1 and this is the case.
>
> The only two reasons I can think of why this might be are 1) it's
> an OSX
> 10.3.9 thing (as opposed to 10.4), or it's something the Rev guys
> are fixing
> for 2.7.3. ???
Hmm, I pasted your script into a button (2.7.2, OS X.4) and here is
what I get with preserveVariables = false (default when launching Rev) -
First click: answer dialog with 5
Second click: answer dialog with 2
I then added some spaces to script and recompiled. I get the same
behavior as above indicating that myCheck was reset.
I then set the preserveVariables to true. The answer dialog now
displays "2" even after I recompile the script.
Odd that it doesn't work under 10.3.9.
--
Trevor DeVore
Blue Mango Learning Systems - www.bluemangolearning.com
trevor at bluemangolearning.com
More information about the use-livecode
mailing list