• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
PrefPane subclass error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PrefPane subclass error


  • Subject: PrefPane subclass error
  • From: Jaime Magiera <email@hidden>
  • Date: Mon, 12 Mar 2007 17:21:33 -0400

Hello,

I'm in the process of writing my first preference pane. I've used instructions from http://www.macdevcenter.com/pub/a/mac/2006/01/27/ preferences.html and the PreferencePane .pdf from Apple. The pref pane title and icon show up in toolbar of my application. However, when the app launches or when I select the preference from the toolbar (in both cases calling load), I get the error...

2007-03-12 17:02:05.408 MyApp[9071] /Users/jaimelm/myapp/build/ Release/MyApp.app/Contents/PreferencePanes/ExportPrefs.prefPane not loaded as pref pane: principal class not a subclass of NSPreferencePane

This is really odd because the nib has the custom owner class set to exportPreferencePaneController, which is a subclass of NSPreferencePane...

==========

#import <Cocoa/Cocoa.h>
#import <PreferencePanes/NSPreferencePane.h>


@interface exportPreferencePaneController : NSPreferencePane {

}

@end

===========

I believe the plist sets the Principal Class correctly...

==============================

[annastasia:myapp/preferencePanes/exportPrefs] jaimelm% cat ExportPreferences-Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http:// www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>ExportPreferences</string>
<key>CFBundleIconFile</key>
<string>pref-advanced</string>
<key>CFBundleIdentifier</key>
<string>com.mycompany.myapp.ExportPreferences</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleSignature</key>
<string>SRN</string>
<key>CFBundleVersion</key>
<string>105</string>
<key>NSMainNibFile</key>
<string>exportPrefs</string>
<key>NSPrincipalClass</key>
<string>exportPreferencePaneController</string>
<key>iconPath</key>
<string>pref-advanced.png</string>
<key>paneName</key>
<string>ExportSettings</string>
<key>toolTip</key>
<string>Export Preferences</string>
</dict>
</plist>


===========================================

The mechanism in general works. There are other PrefPanes created by a previous developer that load fine. Any thoughts on how to debug this particular pane further, or does anything stand out that I might have done wrong?

thanks,

Jaime Magiera
Sensory Research Network
http://www.sensoryresearch.net




_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


  • Follow-Ups:
    • Re: PrefPane subclass error
      • From: Jaime Magiera <email@hidden>
  • Prev by Date: Force authentication with NSURLConnection
  • Next by Date: Re: windowDidLoad doesn't run
  • Previous by thread: Re: Force authentication with NSURLConnection
  • Next by thread: Re: PrefPane subclass error
  • Index(es):
    • Date
    • Thread