• 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: Simple Question: How to exit gracefully from any method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Prev by Date: Re: Getting hold of the XCode's project Application
  • Next by Date: Sub projects and build settings
  • Previous by thread: Re: Getting hold of the XCode's project Application
  • Next by thread: Sub projects and build settings
  • Index(es):
    • Date
    • Thread