Re: A Mac App & helper NSStatusItem - how to share preferences
Re: A Mac App & helper NSStatusItem - how to share preferences
- Subject: Re: A Mac App & helper NSStatusItem - how to share preferences
- From: Michael Ash <email@hidden>
- Date: Wed, 11 Feb 2009 11:14:24 -0500
On Wed, Feb 11, 2009 at 5:55 AM, Trygve Inda <email@hidden> wrote:
> In my helper app I use:
>
> userDefaults =
> [[NSUserDefaults standardUserDefaults]
> persistentDomainForName:kMainAppIdent];
>
> You just need to make sure there is no chance of the helper and the host
> writing at the same time to the same file.
Actually there is no such need. The user defaults system is smart
about synchronizing simultaneous changes from multiple processes, and
will do the right thing if both of your processes should hit the file
at the same time.
Mike
_______________________________________________
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