Concise Variables

Geoff Canyon gcanyon at inspiredlogic.com
Sun Feb 6 16:44:48 EST 2005


You could do the global thing. You could also write an initialization 
routine, something like:

on initLocals
   put "whatever" into buttonPlay
   -- etc.
end initLocals

Then you can call it whenever you update the script. You can even do it 
automatically, something like:

try
   add the width of buttonPlay to x
catch tSomeErr
   initLocals
   add the width of buttonPlay to x
end try

...although that gets a bit unwieldy.

gc

On Feb 6, 2005, at 2:31 AM, Scott Rossi wrote:

> I'm looking for a way to employ concise persistent variable names in a
> script.
>
> Currently, I'm using the form:
>
>   get the hilite of buttonPlay
>
> ...where buttonPlay is a script local variable containing the absolute
> reference to a control.  The problem is, as soon as I edit the script, 
> the
> value of buttonPlay is lost.  I have about 15 of these references to 
> manage.
>

regards,

Geoff Canyon
gcanyon at inspiredlogic.com



More information about the use-livecode mailing list