• 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: Can I figure out which default changed from an NSUserDefaultsDidChange notification?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: John Clayton <email@hidden>
  • Date: Sat, 15 Nov 2003 13:36:44 -0500

Panther it is, and thanks, Brian! I think this is just what I'm looking for ..... [fingers crossed].

John


On Nov 15, 2003, at 12:41 PM, Brian Webster wrote:

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.

References: 
 >Can I figure out which default changed from an NSUserDefaultsDidChange notification? (From: John Clayton <email@hidden>)
 >Re: Can I figure out which default changed from an NSUserDefaultsDidChange notification? (From: Brian Webster <email@hidden>)

  • Prev by Date: Re: fatal error - what causes it?
  • Next by Date: Re: Programmatically setting NSArrayController's contentArray
  • Previous by thread: Re: Can I figure out which default changed from an NSUserDefaultsDidChange notification?
  • Next by thread: fatal error - what causes it?
  • Index(es):
    • Date
    • Thread