global problems

J. Landman Gay jacque at hyperactivesw.com
Tue Aug 2 11:07:41 EDT 2005


Mark Wieder wrote:

> And I still can't imagine a scenario in which you would want a global
> left over from a previous stack *only for that session*. I'll warrant
> that I may still be missing something VERY basic, but it still makes
> no sense to me.

Globals are necessary when one has a suite of stacks that must interact 
as a unit. One very common example is a "find" handler. Assume a number 
of data stacks, each a clone of the others. A handler asks what you want 
to find and puts that string into a global. The next time the user wants 
to find something, you can use the same string to allow a persistent 
search across many stacks.

If you are using only a single stack then a global may not be necessary, 
since you could manage the variable within the stack itself. But if you 
are distributing your stacks with Player or for use within the IDE, you 
can't do that. You need a global.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list