• 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: NSApplicationMain arguments [SOLVED]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSApplicationMain arguments [SOLVED]


  • Subject: Re: NSApplicationMain arguments [SOLVED]
  • From: email@hidden
  • Date: Sat, 12 Apr 2008 19:00:57 +0200

Oh, right. I didn't think of that. Thanks for the correction and clarification.

F.

On Sat, Apr 12, 2008 at 6:46 PM, Ken Thomases <email@hidden> wrote:
>
>  You're grabbing all defaults from all domains with the above, and promoting
> them all into the NSArgumentDomain below, changing their precedence in the
> search order.  That will probably have undesirable effects.  You can get a
> mutable copy of just the NSArgumentDomain with this:
>
>         NSMutableDictionary* myValues = [[[NSUserDefaults
> standardUserDefaults] volatileDomainForName:NSArgumentDomain] mutableCopy];
>
>  (You can add a call to -autorelease to that, or explicitly release it when
> you're done with it.)
>
>
>
>
> >
> >   [myValues setObject:@"Bar" forKey:@"Foo"];
> >        [[NSUserDefaults standardUserDefaults]
> > removeVolatileDomainForName:NSArgumentDomain];
> >        [[NSUserDefaults standardUserDefaults] setVolatileDomain:myValues
> > forName:NSArgumentDomain];
> >        [pool release];
> >
> >   return NSApplicationMain(argc,  (const char **) argv);
> > }
> >
>
>  -Ken
>
>
_______________________________________________

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: NSApplicationMain arguments [SOLVED] (From: email@hidden)
 >Re: NSApplicationMain arguments [SOLVED] (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: Override AppleScrollBarVariant on NSScroller?
  • Next by Date: Re: Transparent view click-through -- SOLVED
  • Previous by thread: Re: NSApplicationMain arguments [SOLVED]
  • Next by thread: Re: Override AppleScrollBarVariant on NSScroller? [SOLVED]
  • Index(es):
    • Date
    • Thread