Understanding 'the defaultStack'

Jeanne A. E. DeVoto revolution at jaedworks.com
Sat Oct 8 19:51:37 EDT 2016


At 10:26 AM +1100 10/9/2016, Monte Goulding wrote:
>I just had a look into the source and here's the but in the go 
>command causing confusion:
>
>     if (t_stack->getmode() == WM_TOP_LEVEL || t_stack->getmode() == 
>WM_TOP_LEVEL_LOCKED)
>         MCdefaultstackptr = t_stack;
>
>What this means is that unless the mode of the stack is topLevel (1) 
>or topLevel + cantModify (2) the defaultStack is not changed by the 
>go command.


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).

(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.)




More information about the use-livecode mailing list