Reset Locals?
Peter T. Evensen
pevensen at siboneylg.com
Thu Jul 6 11:32:31 EDT 2006
I think what Trevor said is if you modify you script to be:
local myCheck = ""
on mouseUp
if myCheck = "" then
put 5 into myCheck
else put 2 into myCheck
answer myCheck
end mouseUp
(Note the assignment to myCheck in the local declaration) Then you will
get the desired result (as you did in 2.6.x)
At 11:42 PM 7/5/2006, you wrote:
>Recently, Trevor DeVore wrote:
>
> > script locals are only preserved across script compilation if you
> >
> > set the preserveVariables to true
> >
> > Otherwise 2.7 behaves as previous engines.
>
>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. ???
>
>(Also, why is the answer dialog so slow to appear in Rev 2.7? 2.6 is way
>faster.)
>
>Regards,
>
>Scott Rossi
>Creative Director
>Tactile Media, Multimedia & Design
>-----
>E: scott at tactilemedia.com
>W: http://www.tactilemedia.com
>
>
>_______________________________________________
>use-revolution mailing list
>use-revolution at lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-revolution
Peter T. Evensen
http://www.PetersRoadToHealth.com
314-629-5248 or 888-682-4588
More information about the use-livecode
mailing list