Thank you Jamie and Jason. Jamie's email has just panicked me as I've
been using CFPreferences rather than NSUserDefaults. It's a system
preference pane and I understood that CFPreferences was the way to do
this. The documents for CFPreferences kept on saying not to
synchronize regularly, so I thought that when synching when the window
closed would be a good option.
That said, if I'm on the wrong track I can always change my strategy
if there's a better way I missed?
Adam
On Oct29, 2008, at 5:38 PM, Jason Coco wrote:
On Oct 29, 2008, at 12:22 , Adam Penny wrote:
Hi there,
I want to save preferences when the user either closes the
preference pane window, clicks the show all button or quits system
preferences. Can I just put the method call in the -(void)dealloc
or is this a bad idea?
This is a bad idea. -(void)dealloc may never be called. You should
do this in your pref pane subclass in the -(void)didUnselect or -
(void)willUnselect functions.
J
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please 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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]