views:

97

answers:

1

Is it possible to implement a locking effect in a NSPreferencePane that we create? Similar to the lock found in other system preferences panes (such as Energy Saver, etc)

I know that I could create a keychain item and then just have the enabled boolean of the controls bound to something that depends on the user authenticating successfully, but is there a better way? Something that presents the same keychain authentication dialog, with the same message, etc?

+4  A: 

You should first read the Authorization Services Programming Guide. Once you have understood the concepts, have a look at the SFAuthorizationView class for the lock icon. Note that although they are similar, a keychain dialog is not related to an authentication dialog.

0xced