Re: How doess Cocoa handle SIGINT?
Re: How doess Cocoa handle SIGINT?
- Subject: Re: How doess Cocoa handle SIGINT?
- From: Philippe Mougin <email@hidden>
- Date: Wed, 27 Jun 2001 16:18:29 +0200
Thierry Faucounau wrote :
It seems then that my situation gets a lot easier, as I mentioned, in
the UNIX code, the signal handler just sets a global instructing the
engine to abort whatever it is doing.
In my Cocoa version, I'll just trap the abort key sequence (I'll
probably change it to Command-. and hook it up as a menu command) from
the main AppKity thread, set the global and be done with it.
In NEXTSTEP's AppKit, this functionality was built-in. The
NXUserAborted() function was used to know if the user had typed
"Command-." The super nice thing: it was not using multi-threading
(IIRC). This was super handy to use in programs and helped a lot to
provide a good user experience.
It would be great to bring back this feature into Cocoa.
Phil