When is a stack "dirty"?
m.schonewille at economy-x-talk.com
Wed Apr 8 16:09:07 EDT 2015
The variable gRevStackStatus["Short name of a stack"] is set to true
whenever a control moves or changes as the result of user input.
Messages triggering an update or gRevStackStatus are openField and
focusIn for example. I think that moveControl and resizeControl are
monitored too. I haven't checked which messages are monitored, for a
Whenever you bring a stack with a field to the front, the IDE finds the
first field that has the lockText set to false and the traversalOn set
to true. This field gets focus and gRevStackStatus is set to edited.
Whenever you try to close a stack, or quit the IDE, LiveCode briefly
sets the focus to each of the stacks that is currently visible. The
first field gets the focus and thus the gRevStackStatus is set to true
--if it has a field.
In other words, the IDE sets gRevStackStatus to true for any stack with
a field, before you close it, and you will always see a Save dialog for
If you want to prevent this from happening, you will need to write your
own frontscript that handles the closeStackRequest, shutDownRequest and
Economy-x-Talk Consulting and Software Engineering
Installer Maker for LiveCode:
Buy my new book "Programming LiveCode for the Real Beginner"
LiveCode on Facebook:
On 4/8/2015 18:33, Peter Haworth wrote:
> After several years of using Livecode, I still don't understand how the IDE
> decides when a stack needs to be saved when I quit from it.
> As an example, if I delete a substack by script then quit, the stack isn't
> saved. If I change the vale of a custom property by script then quit, the
> stack isn't saved. Same thing happens if I add a new substack by script.
> And if I change the value of a custom property by script.
> Surely the IDE should be aware that a save is needed in those
More information about the Use-livecode