Unpopularity of global variables - why?
Richard Gaskin
ambassador at fourthworld.com
Mon Oct 15 15:21:00 EDT 2012
Ken Ray wrote:
...
> Custom Props:
...
> Cons: *Much* easier to accidentally store permanently what
> should be a temporary change to a value (for stacks that need to call
> "save" for any reason); more difficult to use (gMyGlobal vs. "the
> uWidgetType of btn 3 of card 123 of stack 'WhoTheHellCares'")
>
> I'm sure there's more, but those are what popped into my head. :D
Here's one more for custom props:
They may be best used very sparingly because they can potentially be
unreliable.
If any script attempts to get or set a custom property while the
lockMessages is true, any getProp or setProp messages won't be triggered.
If such handlers are necessary for execution unexpected behaviors will
occur, and given the nature of such scripts tracking down the cause of
the errant behavior can be tricky and time-consuming.
--
Richard Gaskin
Fourth World
LiveCode training and consulting: http://www.fourthworld.com
Webzine for LiveCode developers: http://www.LiveCodeJournal.com
Follow me on Twitter: http://twitter.com/FourthWorldSys
More information about the use-livecode
mailing list