Understanding 'the defaultStack'

Graham Samuel livfoss at mac.com
Fri Oct 7 03:56:01 EDT 2016


I’m having a bit of difficulty understanding what the LC Dictionary says about ‘the defaultStack’. I had assumed that when a script executes

  go stack “myStack”

then the defaultStack would be set to “myStack” in all circumstances. This seems not to be the case. Jacque Gay recently told me:

> If a stack isn't toplevel and another stack with a lower mode is already open, I don't think it will become the defaultstack so you'd have to set that by script.

The Dictionary says:

> The defaultStack property is particularly useful in stacks opened in a mode other than an editable window (such as stacks that are being used as dialog boxes, palettes, ormenus). LiveCode's message box and editing palettes set the defaultStack property to the value returned by the topStack function before performing a stack action.

I am not sure what this means, but it doesn’t seem to me to to say explicitly what Jacque told me. Does the Dictionary need updating, or is it just my brain (slim chance)?

Graham



More information about the use-livecode mailing list