Im trying to implement Omni prefs but I've run into a snag. it's probably me, but I also found what I think is an inconsistency in the OmniPreferencesExample, but I'm not sure.
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">To configure our preference panes, we add a top-level key, OFRegistrations, and under it, keys for each of our preference client subclasses. The dictionary for each preference pane should include the following keys and values:
snip..
</font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">It sounds like OFRegistrations has a child named <insert name of your subclass of OAPreferenceClient> who has these chilldren:
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif"> • title - A title for the preference pane.
• shortTitle (Optional) - You can supply a short title to be used in places the regular one doesn't fit.
• identifier (Optional) - This is a name for the preference pane which is never made visible to the user but is used to identify the pane internally. You should use this if you're providing multiple localizations of your application.
• iconName - The name of the image file containing the pane's icon (not including filename extension).
• nibName - The name of the nib file for the panel's user interface (not including ".nib").
• defaultsDictionary (Recommended) - Instead of registering default values for each preference in your app's code, NSUserDefaults keys and values can be listed here. If your defaults are registered here, OAPreferences will make it easy for users to reset their personalized settings in each preference pane back to default values.
• defaultsArray (Optional) - If you don't register your defaults via the defaultsDictionary key, you can still make use of the "Restore Defaults" functionality by listing the NSUserDefaults keys each preference pane is responsible for here.
• category (Optional) - In an application with a large number of preference panes (such as OmniWeb), it may become useful to organize them into categories. If you create multiple categories, OAPreferences will automatically use a preferences window layout like OmniWeb's, with a "Show All" view and a toolbar for "favorite preferences".
• ordering (Optional) - If you have a small number of preference panes, OAPreferences will present them in a style similar to Mail's Preferences window, with a matrix of icons across the top which can be clicked to switch panes. Use this key to specify the order in which they should appear — lower numbers are listed first. (If you have a large number of panes or multiple categories, this key will have no effect; the "Show All" view lists them in alphabetic order, and the "favorites" toolbar is user-orderable.)
• helpURL (Optional) - If your application has Apple Help documentation, include the relative URL from your help book folder to the pane's help page here. (WARNING: in current releases of OmniAppKit, this key is optional in an all-or-nothing sense: if you include a helpURL for one pane, all other panes must have one as well.)
</font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">While in the info.plist of OmniPreferencesExample, OFRegistrations has a child OAPreferenceController which has a child OPEColorPreferences (mine is called DBGeneralPreferences) which has the above chilldren.
Does one only use OAPreferenceController in the info.plist if they use OFBundleRegistryConfig? The aforementioned 'snag' is that, when the application is executed, a run error occours:
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif"> 2002-06-02 01:08:27.074 dasBoot[11275] OFBundleRegistry warning: registration class 'OAPrefenceController' from bundle '/Users/xaos01/Projects/Builds/dasBoot.app' not found. </font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">Then, the first time the 'preferences...' menu item is selected this alert is shown:
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif"> *** -[NSCFArray objectAtIndex:]: index (0) beyond bounds (0) </font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">And thereafter when the 'preferences...' menu item is selected, a blank preference sized/shaped window is shown sans pref-pane views.
My initial idea is that it cant find my pref pane nib so i look in my info.plist, and its properly referenced (I guess) with my nib name without extension.
begin edit---
You know that saturday night live news skit with Gilda Radner where after this hella long spiel about something or other and at the end she sez..
"Never Mind"
OAPrefenceController != OAPreferenceController
<small>[ 06-02-2002, 06:15 AM: Message edited by: 3R1C ]</small>