• 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: NSPreferencePane and app terminate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSPreferencePane and app terminate


  • Subject: Re: NSPreferencePane and app terminate
  • From: Brian Bergstrand <email@hidden>
  • Date: Wed, 29 Nov 2006 10:56:45 -0600

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Nov 29, 2006, at 2:03 AM, Trygve Inda wrote:



Is there a way for my pref pane to know when the host app is switching me
out because it is about to terminate?


Adding applicationWillTermine does not work as it is never called.


Your pref pane is not the NSApp delegate, so you have to register manually for the termination notification:


[[NSNotificationCenter defaultCenter] addObserver:self
            selector:@selector(applicationWillTerminate:)
            name:NSApplicationWillTerminateNotification
            object:nil];

HTH.

Thanks,

Trygve


Brian Bergstrand <http://www.bergstrand.org/brian/> PGP Key ID: 0xB6C7B6A2

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFFbbvSedHYW7bHtqIRAjttAJ4sIac3C1efLc8O1jfX7CjYHiNLIQCfdT16
oxni8O7pfQ0Kiy4FSoprlbw=
=ETwl
-----END PGP SIGNATURE-----
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: 
 >NSPreferencePane and app terminate (From: Trygve Inda <email@hidden>)

  • Prev by Date: NSTask memory leak
  • Next by Date: Re: NSTask memory leak
  • Previous by thread: NSPreferencePane and app terminate
  • Next by thread: Getting this when I do that...
  • Index(es):
    • Date
    • Thread