Re: Simple Question: How to exit gracefully from any method
Re: Simple Question: How to exit gracefully from any method
- Subject: Re: Simple Question: How to exit gracefully from any method
- From: Alastair Houghton <email@hidden>
- Date: Fri, 2 Apr 2004 10:40:07 +0100
On 30 Mar 2004, at 16:44, Thomas Dibble wrote:
> If you are using Cocoa, you can use the "sharedApplication" method on
> NSApplication to get the running NSApplication object, then call
> "terminate" on it to quit the application gracefully.
You don't need to use -sharedApplication, because there's a global
called NSApp that already refers to the shared NSApplication object.
So:
[NSApp terminate:self];
rather than
[[NSApplication sharedApplication] terminate:self];
Kind regards,
Alastair.
--
http://www.alastairs-place.net
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.