Understanding 'the defaultStack'

Monte Goulding monte at appisle.net
Sat Oct 8 16:51:09 EDT 2016


> On 9 Oct 2016, at 7:22 AM, Richard Gaskin <ambassador at fourthworld.com> wrote:
> 
> The rule Dr. Raney gave me is that the defaultStack is the topmost visible stack of the lowest mode.

^ that’s pretty close but there are some other things that come into play. It’s a bit of a slippeyr fish.

The defaultStack is set when executing a script to the stack the script is in until it is changed by that script. After the script runs it will be reset to the previous value unless the previous defaultStack happened to be deleted.

Some events cause the defaultStack to be set to the topStack. The default stack is reset in the main engine loop to the stack Richard described.

Cheers

Monte




More information about the use-livecode mailing list