• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Seeking a graceful way to end a program
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Seeking a graceful way to end a program
      • From: Paul Johnson <email@hidden>
References: 
 >Seeking a graceful way to end a program (From: Paul Johnson <email@hidden>)
 >Re: Seeking a graceful way to end a program (From: Fritz Anderson <email@hidden>)
 >Re: Seeking a graceful way to end a program (From: Paul Johnson <email@hidden>)

  • Prev by Date: Re: Seeking a graceful way to end a program
  • Next by Date: Re: Help with threads and queues
  • Previous by thread: Re: Seeking a graceful way to end a program
  • Next by thread: Re: Seeking a graceful way to end a program
  • Index(es):
    • Date
    • Thread