Francis Nugent Dixon wrote:

I think Scott has the right attitude. Use globals
if you need them, Use custom properties if you don't
like the power/scope/limitations of globals.

I would respectfully amend that to read:

Use globals if you need them, use custom properties if you need data bound persistently to an object, and use accessors for anything else.

Variables are volatile (they go away when the session ends), and that's a very useful feature in many cases. Binding data to objects can cause those values to remain with the object if the object is in a stack that gets saved. If you need values to persist between sessions then properties may be the best choice, but if you need volatility globals or accessors that use globals can be a better fit.

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 LiveCode Journal blog: http://LiveCodejournal.com/blog.irv

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to