Re: Reading System Preferences
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.