Re: NSUserDefaults, setPersistentDomain & NSUserDefaultsDidChangeNotification
Re: NSUserDefaults, setPersistentDomain & NSUserDefaultsDidChangeNotification
- Subject: Re: NSUserDefaults, setPersistentDomain & NSUserDefaultsDidChangeNotification
- From: Dave Thorup <email@hidden>
- Date: Mon, 29 Sep 2003 11:14:35 -0600
On 9/29/03 2:10 AM, "petite_abeille" <email@hidden> wrote:
>
Hello,
>
>
I'm trying to synchronize NSUserDefaults changes across applications
>
and I'm a little bit at lost on how to make it happen...
>
>
...
>
>
Any idea? Should I forward NSUserDefaultsDidChangeNotification to the
>
local NSDistributedNotificationCenter? Something else altogether?
Yes, you'll need to set up a distributed notification center or some other
kind of inter-application communication. The
NSUserDefaultsDidChangeNotification is only sent to an application when that
application's defaults have changed (and it's probably not sent when the
defaults are changed externally). Applications don't receive notifications
for when the defaults have changed in other applications.
it sounds like you're trying to get the System Preferences' Login Items pane
to re-load its defaults. I don't know of any way to tell it to do that. If
you control all of the applications that you want to synchronize then you
could do it. But if you want other people's applications to be synchronized
then I think you're out of luck.
PS Try out Defaults Manager for a nifty tool when working with defaults
(www.kuwan.net/defaultsmanager).
____________________________________
Dave Thorup
Software Engineer
email@hidden
www.kuwan.net
Defaults Manager - The premier editor for Mac OS X's User Defaults /
Preferences database.
_______________________________________________
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.