Globals

Mark Wieder mwieder at ahsoftware.net
Sun Jun 10 00:39:49 EDT 2012


Peter-

Saturday, June 9, 2012, 7:32:35 PM, you wrote:

> Assuming I do, I guess that came as a surprise to me for some reason.  I
> would not have expected globals to cross stack file boundaries but I guess
> they are truly global!

Yes. It's not a gotcha, but a feature of sorts. I avoid globals
whenever possible, but Chipp Walters showed me a nifty use for them a
while back that uses exactly this feature. You can set a global
variable in a plugin stack, then go to some other stack and make use
of it. So it's kind of like having a palette of clipboards around.

...now if only constants had a global scope as well...

-- 
-Mark Wieder
 mwieder at ahsoftware.net





More information about the use-livecode mailing list