Understanding 'the defaultStack'

Monte Goulding monte at appisle.net
Sat Oct 8 20:04:45 EDT 2016


> On 9 Oct 2016, at 10:51 AM, Jeanne A. E. DeVoto <revolution at jaedworks.com> wrote:
> 
> OK, thar seems like a bug to me. If the only stacks open are palettes, for example, then go should make the target stack the topStack (and hence the defaultStack, since no stacks of lower mode are open).

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. 
> 
> (In practice, I usually adopt the strategy of setting the defaultStack explicitly or else targeting everything to the specific stack I want. I think of the defaultStack as being pretty fragile.)

Yes that’s what I do to as the script is much clearer if you explicitly set the defaultStack anyway.

Cheers

Monte


More information about the use-livecode mailing list