Reset Locals?

Scott Rossi scott at tactilemedia.com
Thu Jul 6 13:07:25 EDT 2006


Recently, Peter T. Evensen wrote:

> 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)

Thanks Peter -- the above does indeed work for me.  And after re-reading the
What'sNew docs, they do state that locals must now be explicitly set to some
value, as opposed to simply declared.

Thanks to the folks who chimed in as well regarding the access of a script's
local values. :-)

Regards,

Scott Rossi
Creative Director
Tactile Media, Multimedia & Design
-----
E: scott at tactilemedia.com
W: http://www.tactilemedia.com





More information about the use-livecode mailing list