Unpopularity of global variables - why?
ambassador at fourthworld.com
Mon Oct 15 15:40:07 EDT 2012
Monte Goulding wrote:
> On 16/10/2012, at 6:21 AM, Richard Gaskin wrote:
>> 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.
> Do you consider this a bug in lockMessages? Perhaps set and getProps
> should be able to be marked in some way that they are required. I
> guess changing the behavior of lockMessages could cause issues.
Agreed. But I like the idea of having a way to change that.
Since the issue is specific to getProp and setProp, maybe there might be
a way to declare those as "required", e.g.:
required getProp MyProp
This would keep such a change optional, and limit its scope to only
those getProp and setProp handlers that are essential, since sometimes
it may be useful to have them suppressed by lockMessages.
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