defining and using globals in an application
Scott Rossi
scott at tactilemedia.com
Thu Jul 7 01:18:05 EDT 2011
Hi Mark:
If I understand what you're looking for, there are other ways to get what
you want if you don't want to declare a global: you could use a custom
property or a function.
the specialGlobalValue of this stack
specialGlobalValue()
I disagree with your assessment of declaring globals as a "falldown" issue.
In fact, I would say it's the reverse. When coming back to code after a
hiatus of development, or when looking at someone else's code, the fact that
the global is declared as such can clarify where its value originates from
(to my mind anyway).
Regards,
Scott Rossi
Creative Director
Tactile Media, UX Design
Recently, Mark Stuart wrote:
> Again, my point exactly.
> You HAVE to declare the global again, and again where needed.
>
> I'd rather it once declared and a value put into it, the value be available
> elsewhere WITHOUT having to declare it again.
> It just sets up the developer for an easy "falldown". The time it takes,
> especially for a different developer in the same application or coming back
> some time later, to find the declared global name.
>
> Which brings up a whole new issue of intelli-sense or type-ahead
> variable-name-while-typing-a-script convention.
> But I won't go there at this time.
More information about the use-livecode
mailing list