Programing style

John Craig jc at spl21.net
Mon Nov 20 05:38:11 EST 2006


Good point by Eric on custom properties.  I wrote a couple of plugins 
recently and it wasn't until I used them both together that I realised 
they had a global variable name in common and would not work together.  
A custom property would guarantee no conflict in this case.

JC

Eric Chatonet wrote:
> Mark,
>
> As this thread is about programming style, I want to add something:
> I completely agree: I avoid too using globals and often I prefer to 
> use custom properties.
> Probably because I have written plugins for the IDE and wanted to 
> avoid any conflict with any user ;-)
> In addition, this way of doing allows to run a private "CleanStack" 
> handler which resets controls appearance, default values (for these 
> fake globals), etc. when saving the stack.





More information about the use-livecode mailing list