Closing stacks with the close button on the title bar in a standalone on Mac OSX, all changes are lost without warning.
I'd like to a) give the user a dialog prompting a save, b) hide the title bar or c) something else that will keep this from happening.
Anything I can do? Thanks in advance.
Jim
title bar solutions?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Hi Jim,
You can use the closeStackRequest message to run a script that asks the user whether s/he really wants to close the programme etc. If the user confirms and doesnt' cancel any file saving prompts, you can pass the message. If the user cancels, don't pass the message.
Best,
Mark
You can use the closeStackRequest message to run a script that asks the user whether s/he really wants to close the programme etc. If the user confirms and doesnt' cancel any file saving prompts, you can pass the message. If the user cancels, don't pass the message.
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
And if you want the same thing to happen when the user tries to quit your application on MacOSX, make sure to trap the 'shutdownRequest' message in an appropriate place.
If your data is supposed to be saved in a stack, and not some other storage facility such as a database or a custom text or binary file format, you'll also want to consider the following:
- you cannot save stacks that are part of the standalone
- the 'save' command will do what you want.
In any case, you'll want to read this article by Sarah Reichelt on RevJournal: http://www.revjournal.com/tutorials/sav ... ution.html as it gives you plenty of information.
Hope this helped,
Jan Schenkel.
If your data is supposed to be saved in a stack, and not some other storage facility such as a database or a custom text or binary file format, you'll also want to consider the following:
- you cannot save stacks that are part of the standalone
- the 'save' command will do what you want.
In any case, you'll want to read this article by Sarah Reichelt on RevJournal: http://www.revjournal.com/tutorials/sav ... ution.html as it gives you plenty of information.
Hope this helped,
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com