On Thu, Apr 29, 2010 at 2:46 PM, Markus Spoettl <msappleli...@toolsfactory.com> 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 (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com