Re: Seeking a graceful way to end a program
Re: Seeking a graceful way to end a program
- Subject: Re: Seeking a graceful way to end a program
- From: Jens Alfke <email@hidden>
- Date: Thu, 29 Apr 2010 13:14:21 -0700
On Apr 29, 2010, at 12:56 PM, Paul Johnson wrote:
I found one possible tip in "Cocoa Design Patterns" (p. 253.) The
sample code uses NSRunAlertPanel(). I'd like to display an alert and
then perform an exit(1). (Somewhere I need to handle a click on a
"Quit" button in the Alert.)
Sure. Just call NSRunCriticalAlertPanel, then call exit(1). Presumably
you only want one button in the panel ("Quit" or "Uh, Sorry") so
there's not even any need to check the return value.
—Jens_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden