NSPreferencePane and app terminate
NSPreferencePane and app terminate
- Subject: NSPreferencePane and app terminate
- From: Trygve Inda <email@hidden>
- Date: Wed, 29 Nov 2006 08:03:57 +0000
- Thread-topic: NSPreferencePane and app terminate
Sorry,
Sent before it was finished... I install a Distributed notification observer
in my pref pane and it needs to keep running when the SysPrefs app is open
but my pane is not shown (the notification method keeps some controls in
synch with another app).
This all works fine since in mainViewDidLoad I call:
[[NSDistributedNotificationCenter defaultCenter] addObserver:self
selector:@selector(statusItemDidModify:)
name:@"statusItemDidModifyNotification" object:nil];
But I never call:
[[NSDistributedNotificationCenter defaultCenter] removeObserver:self
name:@"statusItemDidModifyNotification" object:nil];
I can't call removeObserver in willUnselect or didUnselect since I need the
controls to be in sync even when my view is invisible.
Is it safe not to call removeObserver?
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.
Thanks,
Trygve
_______________________________________________
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