[Q] Using SFAuthorizationView in a Preference Pane project
[Q] Using SFAuthorizationView in a Preference Pane project
- Subject: [Q] Using SFAuthorizationView in a Preference Pane project
- From: JongAm Park <email@hidden>
- Date: Wed, 20 Aug 2008 11:08:05 -0700
How are you doing?
I write a sample preference pane in which there are a few text fields
and check boxes.
They are organized as two groups: one for system-wide setting, and the
other for a user-specific setting.
I use the SFAuthorizationView for restricting users to access a
system-wide setting.
However, it should be able to retrieve a system wide setting and display
it in grayed-out text in the text fields and set the state of the check
boxes in that way.
There are two things I would like to do.
1. Without asking a user's ID and password, which is done by the
SFAuthorizationView, can it get the system wide setting?
It would be nice if a user can see the existing system-wide
setting, although they are grayed-out.
(Only when a user unlocks the "lock" icon provided by the
SFAuthorizationView, he/she can change the setting.)
2. The system-wide setting doesn't seem to be saved in
/Library/Preferences directory, although the user-specific setting is
saved in ~/Library/Preferences directory. The code looks like :
CFPreferencesSetValue( CFSTR("System Name"), [systemNameField
stringValue], kAppID, kCFPreferencesAnyUser, kCFPreferencesAnyHost );
isSuccessful = CFPreferencesSynchronize(kAppID, kCFPreferencesAnyUser,
kCFPreferencesAnyHost);
The isSuccessful contains "YES", when the CFPreferencesSynchronize()
is called.
However, there is no com.GreenLeaf.JAPreferencePaneTest.plist file
in /Library/Preferences for the system-wide setting!
I checked if the system wide setting is saved in other places
already, but I couldn't find it.
Can someone give me some advice?
Thank you.
JongAm Park
_______________________________________________
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