When is a stack "dirty"?

Peter Haworth pete at lcsql.com
Wed Apr 8 17:23:34 EDT 2015


Thanks for the info Mark.  That probably explains what is happening in my
case because the substack I delete is not open at the time I delete it.

What I'm thinking of doing is setting the gRevStackStatus element for the
main stack of the deleted substack in my script which sounds like it should
result in the IDE issuing a save prompt when I quit.  I will probably have
to do the same thing when, for example, I change the value of a custom
property in an unopened stack.

Pete
lcSQL Software <http://www.lcsql.com>
Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>

On Wed, Apr 8, 2015 at 1:09 PM, Mark Schonewille <
m.schonewille at economy-x-talk.com> wrote:

> Hi Pete,
>
> 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 long time.
>
> 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 these
> stacks.
>
> If you want to prevent this from happening, you will need to write your
> own frontscript that handles the closeStackRequest, shutDownRequest and
> appleEvent messages.
>
> --
> Best regards,
>
> Mark Schonewille
>
> Economy-x-Talk Consulting and Software Engineering
> Homepage: http://economy-x-talk.com
> Twitter: http://twitter.com/xtalkprogrammer
> KvK: 50277553
>
> Installer Maker for LiveCode:
> http://qery.us/468
>
> Buy my new book "Programming LiveCode for the Real Beginner"
> http://qery.us/3fi
>
> LiveCode on Facebook:
> https://www.facebook.com/groups/runrev/
>
> 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
>> circumstances?
>>
>>
>> Pete
>>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list