Down a leafy lane or up queer street?

Bob Sneidar bobsneidar at iotecdigital.com
Mon Apr 30 11:07:33 EDT 2018


I avoid global variables as these are visible to any open stack you are working on, so you cannot have 2 stacks open that use the same global names or they will overwrite each other. Instead I use the custom properties of the mainstack as an ad hoc stack global system. I do this with cards and objects too. It means I need to have a line in each script for each property I want to use, but an easy fix for that is to have a handler in the object script that sets the values of script local variables to the values of the custom properties you need. You only have to run this once, say on openCard. Now you have script local variables set to the values of all your properties, AND they have the added virtue of being persistent through app launches. 

Bob S





More information about the Use-livecode mailing list