• 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
Live updating user defaults from a prefpane to a running app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Live updating user defaults from a prefpane to a running app


  • Subject: Live updating user defaults from a prefpane to a running app
  • From: Shamyl Zakariya <email@hidden>
  • Date: Wed, 14 Jul 2010 07:59:07 -0400

Hey everybody,

I'm in the very early stages of writing a headless app which is entirely configured via a pref-pane. This morning I did a quick throwaway app reading some simple settings via user defaults bindings, and changing those settings while the app runs via the command line 'defaults' app. The defaults are written, but the running app never knows that the defaults changed. It has to be relaunched to find out that values changed.

Now my intent is for a pref pane to set the defaults, and for the headless app to know when those defaults change and change its behavior accordingly. So I need some way to let the app know its defaults have changed.

So first off, is there some built-in way to simply 'goose' the app and cause its defaults bindings to trigger?

If not, what's the best practice here? And if I were to use some sort of apple event fired from the prefpane or some other technique to let the app know its defaults have changed, how do I get the user defaults controller in the headless app to apply the updates?

Thanks,

--

shamyl zakariya
	- so much for pathos



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Prev by Date: Re: Adding an image to a project
  • Next by Date: NSTimer access to its -timerFireMethod
  • Previous by thread: Re: Adding an image to a project
  • Next by thread: Re: Live updating user defaults from a prefpane to a running app
  • Index(es):
    • Date
    • Thread