Can't trap Quit

Bill Vlahos bvlahos at mac.com
Fri Sep 14 01:53:00 EDT 2007


When a user selects Quit from the menu in my application the case  
statement doesn't ever catch it. The other menu items work. On a Mac  
the application does quit but on Windows nothing happens.

The only way I can catch a Quit is to put a on shutdownRequest  
handler in the stack. My application contains several instances of  
the stack and I check to see if the stack needs to be saved. I can  
catch this request in the on shutdownRequest handler.

The user can close the window and be prompted to save with an answer  
command. If the user selects Yes then the program saves correctly and  
closes the stack window and all is good. However, if the user answers  
"No" the window closes correctly without saving (as it should) but  
now if the user selects Quit the standalone rapidly closes the  
remaining windows but never asks the user to save. In this situation  
if the user goes to another card in the stack first, then Quit the  
program will correctly ask to save if it is needed.

This bug is in Bugzilla 5362.

So I have two problems and don't have a good solution to either of them.
	1. Quitting is not caught in the menu handler.
	2. Answering No in an answer dialog prevents even the on  
shutdownRequest.

Ken Ray helped me characterize this bug and entered the Buzilla  
ticket. He tried it in MetaCard and it doesn't seem to be a problem  
there. How have folks solved this in Rev?

Thanks,
Bill Vlahos


More information about the use-livecode mailing list