Re: Can I figure out which default changed from an NSUserDefaultsDidChange notification?
Re: Can I figure out which default changed from an NSUserDefaultsDidChange notification?
- Subject: Re: Can I figure out which default changed from an NSUserDefaultsDidChange notification?
- From: Brian Webster <email@hidden>
- Date: Sat, 15 Nov 2003 11:41:14 -0600
Well, if your app is running under Panther, I think you could use
key-value observing to listen to when values in NSUserDefaults are
changed. So, if you're only interested in particular values changing,
you can just register for those particular keys. The docs for this can
be found at
<
http://developer.apple.com/documentation/Cocoa/Conceptual/
KeyValueObserving/index.html>
If you need to run under Jaguar as well though, then no, I don't
believe there's any way to determine what values changed through the
NSNotification mechanism provided by NSUserDefaults.
On Nov 15, 2003, at 9:07 AM, John Clayton wrote:
Hi,
Pretty much what it says. Or, do I need to store the values in my
object state and then compare them each time the defaults change? I
guess what I'm looking for is something like what we see in
NSSortDescriptor where we can access the old value. Well, thanks a
bunch,
John
-----------------------------------------------------
"What did you expect to find?"
-----------------------------------------------------
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.