Checking for 'quit' and aborting shutdown

Devin Asay devin_asay at byu.edu
Mon Dec 2 12:08:16 EST 2013


On Dec 2, 2013, at 3:36 AM, Graham Samuel wrote:

> This is probably a very ancient issue, but I haven't had to deal with it before:
> 
> I've only tried this on the Mac, but I decided to put in a query in a desktop app, "Do you really want to quit?" when a user chooses 'Quit' from a file menu (it's part of a 'shutdownRequest' handler). This obviously requires a response from the user in order to continue. This is fine, unless the user of the whole machine decides to shut it down without closing my app. Then I find that my little dialog is invoked and demands a response before shutting down, but I may not be there to respond to the dialog. Is there any way to effectively detect a general shutdown as opposed to just 'quit'? I think the same problem applies to Windows as well, but I haven't tested it.

Graham,

Ken Ray has lots of great tips on his web site sonsothunder.com, including this one that might be of help for your problem:

http://www.sonsothunder.com/devres/livecode/tips/menu001.htm

Devin


Devin Asay
Learn to code with LiveCode University
http://university.livecode.com





More information about the use-livecode mailing list