• 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: NSUserDefaults and using volatile domains
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSUserDefaults and using volatile domains


  • Subject: Re: NSUserDefaults and using volatile domains
  • From: Chris Parker <email@hidden>
  • Date: Thu, 4 May 2006 13:14:55 -0700

Hi Jesse,

-searchList and -setSearchList: have been non-functional since Mac OS X 10.0. Currently, the only modification of the search path we allow is the addition of suite preferences to an application.

We have an enhancement request to allow the adding of volatile domains to the suite preferences, but OS X has never allowed arbitrary search path manipulation.

.chris

--
Chris Parker
Cocoa Frameworks
Apple Computer, Inc.


On May 4, 2006, at 1:10 PM, Jesse Wesson wrote:

I was hoping to insert the environment variables between NSArgumentDomain and the application domain. Is this no longer possible with the removal of -searchList and -setSearchList:?

Jesse


On May 1, 2006, at 9:43 am, Chris Parker wrote:


On Apr 29, 2006, at 10:11 AM, Jesse Wesson wrote:

I would like to add a volatile domain (the process’ environment variables) to the search path of my command line tool’s user defaults. Once I add the dictionary though, all the keys return nil (code snippet below). Once a volatile domain is added, is it not included to the search path?

Jesse


[[NSUserDefaults standardUserDefaults] setVolatileDomain: [[NSProcessInfo processInfo] environment] forName:@"EnvironmentVariableDomain"];
NSString *path = [[NSUserDefaults standardUserDefaults] objectForKey:@"PATH"];
NSLog( @"PATH=%@", path );

-setVolatileDomain:forName: only associates a dictionary with the name in the NSUserDefaults object - it does not add it to the search path.


Is there a particular reason you'd like to do this? -[NSProcessInfo environment] is the correct way to pick up the environment variables. If you absolutely must have them in your search path, you could use -[NSUserDefaults registerDefaults:] with the dictionary returned from -[NSProcessInfo environment], but that's the best you could do.

.chris

--
Chris Parker
Cocoa Frameworks
Apple Computer, Inc.





_______________________________________________ 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
  • Follow-Ups:
    • Re: NSUserDefaults and using volatile domains
      • From: Jesse Wesson <email@hidden>
References: 
 >Re: NSUserDefaults and using volatile domains (From: Chris Parker <email@hidden>)
 >Re: NSUserDefaults and using volatile domains (From: Jesse Wesson <email@hidden>)

  • Prev by Date: Re: NSUserDefaults and using volatile domains
  • Next by Date: Re: Equivalent of isKindOfClass for Foundation Types?
  • Previous by thread: Re: NSUserDefaults and using volatile domains
  • Next by thread: Re: NSUserDefaults and using volatile domains
  • Index(es):
    • Date
    • Thread