Le 3 janv. 06 à 20:11, Yen-Ju Chen a écrit :
I start to play with PreferenceKit in order to use in an application.
It basically works fine, but I do have some questions:
1. Does it intended to be compatible with Mac's PreferencePane ?
Yes, it is compatible with both NSPreferencePane and Backbone
PrefsModule.
NSPreferencePane is in fact a dummy PKPreferencePane subclass.
2. It's not clear from Cocoa's documentation that how to start the
preference window (not the preference bundle) for an application.
In PreferenceKit, do I just call [PKPreferencesController
sharedPreferencesController] ?
No, a preferences window is not automatically created (it may
supported by default later), you have to add a NSWindow instance and
a PKPreferencesController instance to your nib, then connects
preferences controller outlet called 'owner' to your new window
instance. In order to show preferences window if it isn't visible at
launch time, you just have to call -makeKeyAndOrderFront: action on it.
Take note that [PKPreferencesController sharedPreferencesController]
will return the preferences controller instantiated in your nib if
there is one.
You can read PreferencesKit documentation within its source files or
output it in HTML format with autogsdoc tool. I'm going to put such
HTML documentation soon on etoile-project.org
There is no actions in NSApplications like -showHelp: to bring up
the default preference window.
It might be a useful feature to add.
3. The relationship between the nib (gorm) file and the
PKPreferencePane is not very clear to me.
After playing a while, I realize the PKPreferencePane need to be the
NSOwner of the nib (gorm) file.
Yes.
May be you need more details on this point ?
Does it also apply to PKPreferencesController ?
No.
Take a look at PreferencesKitExample in /Developer/Examples to have a
better idea of what you can do with PreferencesKit.
Quentin.
--
Quentin Mathé
[EMAIL PROTECTED]