Saving stacks before closing

Drs Mark Schonewille m.schonewille at economy-x-talk.com
Mon May 25 06:48:12 EDT 2020


In LiveCode, usually you're asked to save a stack, even if you didn't 
change it.

The reason is that the property that indicates that the stack has been 
changed, is set to true when a field gets focus. A field gets focus 
whenever a stacks comes to front. When a stack is closed, it needs to 
come to the front :-)

On Mac this issue is worse than on Windows.

In standalones, you need to take care of this yourself. I'm sure you can 
do a better job than LiveCode, particularly if you can limit your app
   to specific changes.

Mark Schonewille
Economy-x-Talk
https://ecxtalk.nl
https://www.nt2.nu

Programming LiveCode for the Real Beginner
http://www3.economy-x-talk.com/file.php?node=programming-livecode-for-the-real-beginner

Op 24-5-2020 om 19:28 schreef David Epstein via use-livecode:
> I want to give the user a choice of whether to save changes before closing a stack.  To script this, I will handle the closeStackRequest message, and find a way to keep track of whether the stack in question has been changed since it was last saved.
>
> What I am trying to figure out is under what circumstances LiveCode takes care of this without my scripting it.  In the LiveCode IDE, trying to close an unsaved stack seems automatically to ask me whether I want to save changes (but I have not found a handler in the backscripts that implements this).  This is true of stacks I have created with the IDE “new stack” tool and then try to close.  Is it also true of stacks I have created by script?
>
> And what happens in a standalone?  Does this feature still work there?
>
> In short, do I need to script an option to save changed stacks before closing, or can I rely on LiveCode to take care of this?
>
> Many thanks.
>
> David Epstein
> _______________________________________________
> 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