quit

Jeanne A. E. DeVoto jeanne at runrev.com
Wed Jul 23 09:11:09 EDT 2003


At 4:29 AM -0700 7/23/03, Klaus Major wrote:
>> i work on Mac OS X
>>
>> The quit menu is in the application menu
>> I don't find how I can trap the message "quit" when the user select
>> this item ???
>
>I am not sure, but i don't think that you can trap "quit" per se.



When all else fails.... ;-)



"How to respond to quitting an OS X application

On OS X systems, the "Quit" menu item is part of the Application menu,
which is displayed by the operating system rather than by the application.
Because of this, choosing "Quit" on OS X systems does not send a menuPick
message, so you cannot handle quitting in a menuPick handler.

Instead, choosing "Quit" sends an Apple Event (class "aevt", ID "quit") to
the application. If you don't intercept this Apple Event in an appleEvent
handler, Revolution sends a shutdownRequest message in response to the
Apple Event. To respond to the user choosing "Quit", handle either of these
messages.

Tip:  For easiest cross-platform development, place all the code you want
to execute on quitting in a shutdownRequest handler."

--
Jeanne A. E. DeVoto ~ jeanne at runrev.com
Runtime Revolution Limited - Software at the Speed of Thought
http://www.runrev.com/





More information about the use-livecode mailing list