Initializing local properties
David Bovill
david at vaudevillecourt.tv
Wed Apr 15 07:52:30 EDT 2009
AFAIK - there is no easy or robust way to initialise local variables? That
is you can't do something like:
local thisWorks = "some long complicated result"
> local thisDoesnt = getComplicatedResult()
>
> function getComplicatedResult
> return "some long complicated result"
> end getComplicatedResult
You could initialize things on a preopencard - but this would not allow for
it's use when called from another stack - as in defining a custom property
put the complicated_Result" of btn 1 of stack "Test"
I think there is no way to do this with locals - so you have to functions or
properties and calculate them each time for a handler? Using a global would
be over-cluttering things.
More information about the use-livecode
mailing list