Re: NSPreferencePane and app terminate
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