CFPreferences always returning null
CFPreferences always returning null
- Subject: CFPreferences always returning null
- From: Jim Turner <email@hidden>
- Date: Tue, 24 Feb 2004 10:18:26 -0600
I am trying to read the available keys from a very simple plist using
CFPreferencesCopyKeyList and it continually mocks me by returning null...
The important part of my code:
const CFStringRef appName = CFSTR( "com.apple.myPref" );
CFArrayRef keys;
keys = CFPreferencesCopyKeyList( appName,
kCFPreferencesCurrentUser,
kCFPreferencesCurrentHost );
if( keys == NULL )
{
NSLog( @"keys is NULL!!" );
return;
}
The plist ~/Library/Preferences/com.apple.myPref.plist looks like this
(minus the extra xml stuff):
<dict>
<key>WWWHomePage</key>
<string>
http://www.blah.com/</string>
</dict>
I am ultimately trying to set the WWWHomePage preference found in
com.apple.internetconfig from an application other than Safari, but I'm
attempting to learn the basics of CFPreferences first before I mess with a
much larger target.
I'm out of guesses as to what's wrong. Any help is appreciated.
Jim
_______________________________________________
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.