• 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: Notification for Changed User Defaults
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Notification for Changed User Defaults


  • Subject: Re: Notification for Changed User Defaults
  • From: Jim Hamilton <email@hidden>
  • Date: Sat, 20 Aug 2005 09:09:07 -0400


On Aug 20, 2005, at 8:38 AM, Gerriet M. Denkmann wrote:

I have an app with a preference panel with a text field "FontSize" which is bound to the Shared User Defaults Controller.

If this value changes, my app has to redisplay some text with a new font size.

But how does it know that this value has changed?

KVO

<http://developer.apple.com/documentation/Cocoa/Conceptual/ KeyValueObserving/Concepts/KVOBasics.html#//apple_ref/doc/uid/20002252>

Just observe the appropriate keypath (i.e. "values.FontSize") for the defaults controller.
--
Jim Hamilton


email@hidden
email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Notification for Changed User Defaults (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: NSButton + optionkey?
  • Next by Date: Re: Reporting errors from key-value-coding accessors
  • Previous by thread: Notification for Changed User Defaults
  • Next by thread: NSButton + optionkey?
  • Index(es):
    • Date
    • Thread