NSUserdefaults shared by 2 applications, not synchronized ?
NSUserdefaults shared by 2 applications, not synchronized ?
- Subject: NSUserdefaults shared by 2 applications, not synchronized ?
- From: Aurélien Hugelé <email@hidden>
- Date: Wed, 16 Feb 2005 10:36:02 +0100
hi everyone !
I have a GUI+Daemon application type, so it is in fact _2_ applications. The GUI App is used to modify some values, that are stored in the defaults.
The daemon app read those values, and take them in account to do its job.
I've used addSuiteNamed:@"com.MyApp.TheGUIPartOfMyApp" in the daemon app, so that the daemon can read the defaults of the GUI app. This works beautifully.
But i must have missed something because once launched, the daemon can read the defaults of the GUI, but if i modify the defaults from the GUI, the daemon still get the OLD values, before they were modified...
i would like to be able to modify the values of the defaults from the GUI and that the daemon "immediatly" (let say, at the next get of those values...) see those changes !
is it possible ? if so how ?
i have tried some carbon calls that i hoped could magically solve my problem:
CFPreferencesSetAppValue("com.MyApp.theDAEMONPartOfMyApp"));
CFPreferencesAppSynchronize(CFSTR("));
i can see that the value" myValue" is written in the plist name com.MyApp.theDAEMONPartOfMyApp (as expected of course) but the running daemon defaults are not updated...
thanks for any help !
Aurelien _______________________________________________
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