• 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: Reading System Preferences
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading System Preferences


  • Subject: Re: Reading System Preferences
  • From: Scott Anguish <email@hidden>
  • Date: Fri, 1 Aug 2003 21:03:49 -0400

On Friday, August 1, 2003, at 6:06 PM, Seth Willits wrote:

I'm trying to read the homepage preference set in the System Preferences. I looked in the plist files to find what the key was, changed it in System Prefs to make sure I was looking the right one and then tried to read it in Cocoa like in the code below but there's no string found for the key.

I must be missing something, but I've read the NSUserDefaults section in Cocoa Programming and looked in the Apple documentation but I can't find anything.


[[NSUserDefaults standardUserDefaults] stringForKey:@"WWWHomePage"]



Well, it appears to be stored in the com.apple.internetconfig domain, so it's in a different preferences domain than the default one for the application.

You'd need to read it by changing the preference domain.

Mind you, it's in an ic-data format, so you'd be better off using the Carbon APIs to just ask launch services (or internet config) for it.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: 
 >Reading System Preferences (From: Seth Willits <email@hidden>)

  • Prev by Date: Re: Seeking contacts and advice on finding work in programming for the Mac
  • Next by Date: Problem creating an NSButton subclass in Java
  • Previous by thread: Re: Reading System Preferences
  • Next by thread: Re: Linking a Menu To A Document
  • Index(es):
    • Date
    • Thread