• 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: Sherm Pendley <email@hidden>
  • Date: Thu, 29 Apr 2010 14:51:11 -0400

On Thu, Apr 29, 2010 at 2:46 PM, Markus Spoettl
<email@hidden> wrote:
> On Apr 29, 2010, at 2:31 PM, Paul Johnson wrote:
>> I would like to have some guidance on the proper way to 'gracefully'
>> terminate a program that cannot proceed, for example, when some
>> critical resource can't be created or doesn't exist.
>
> [NSApplication sharedApplication] terminate:nil];
>
> should work, no?

I'd suggest displaying an error dialog first, explaining the situation
and (possibly) what the user should do to correct the problem. Then,
when they click "OK" on that dialog, use the above to exit.

sherm--

--
Cocoa programming in Perl:
http://www.camelbones.org
_______________________________________________

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

References: 
 >Seeking a graceful way to end a program (From: Paul Johnson <email@hidden>)
 >Re: Seeking a graceful way to end a program (From: Markus Spoettl <email@hidden>)

  • Prev by Date: Re: Seeking a graceful way to end a program
  • Next by Date: Re: Seeking a graceful way to end a program
  • 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