• 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: A Mac App & helper NSStatusItem - how to share preferences
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: A Mac App & helper NSStatusItem - how to share preferences (From: Trygve Inda <email@hidden>)

  • Prev by Date: Re: Communication between objects
  • Next by Date: Re: Communication between objects
  • Previous by thread: Re: A Mac App & helper NSStatusItem - how to share preferences
  • Next by thread: How resize a button or label to fit its content (at runtime)?
  • Index(es):
    • Date
    • Thread