Understanding 'the defaultStack'

J. Landman Gay jacque at hyperactivesw.com
Sun Oct 9 01:19:14 EDT 2016


On October 8, 2016 7:06:15 PM Monte Goulding <monte at appisle.net> wrote:

> I can’t help thinking that go touching the defaultStack at all is bug or 
> rather a bad idea in the first place that probably can’t be changed now. 
> Just because you opened a stack does not necessarily mean you want to 
> target the rest of your script to the stack you opened.


Actually that's been the whole xtalk metaphor forever and you're right that 
changing it would break a lot of stacks. When you go to a stack, it becomes 
"this stack", and you are on "this card" and you expect your script to act 
on the controls there. It dates back to HC where there was only a single 
stack open at any time and no confusion was possible. With the introduction 
of multiple windows, the behavior stayed the same and if you want to 
address objects in the original stack, you need to use long object 
references or set the defaultstack yourself.

I'm okay with how it works now, but I want to know what the exceptions are. 
I think I'm starting to get the idea.

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






More information about the use-livecode mailing list