[Pyobjc-dev] pluginbuilder: must specify 'nibname' - why?
Brought to you by:
ronaldoussoren
From: Martina O. <Ma...@Oe...> - 2004-05-30 16:57:54
|
Hi, I'm using pluginbuilder to build an AddressBook plugin. As my plugin doesn't have a nib file, I didn't specify a nibname in the call to buildplugin. But pluginbuilder rejects this: "must specify 'nibname' when building a plugin bundle". Why? It seems that it is satisfied with a dummy nibname, as long as it is nonzero. nibname="" builds fine, but then AddressBook doesn't load my plugin and writes this to the console: MOAddressBookPlugin.bundle does not contain the correct ABActions.h methods. The reason is apparently that NSPrincipalClass is not set in this case: if self.nibname: self.plist.NSMainNibFile = self.nibname if not hasattr(self.plist, "NSPrincipalClass"): if self.principalClass is None: raise bundlebuilder.BundleBuilderError, ( "must specify 'principalClass' when building a " "plugin bundle") self.plist.NSPrincipalClass = self.principalClass Shouldn't this be: if self.nibname: self.plist.NSMainNibFile = self.nibname if not hasattr(self.plist, "NSPrincipalClass"): if self.principalClass is None: raise bundlebuilder.BundleBuilderError, ( "must specify 'principalClass' when building a " "plugin bundle") self.plist.NSPrincipalClass = self.principalClass here is my build script: from PyObjCTools.pluginbuilder import buildplugin buildplugin( name = "MOAddressBookPlugin", mainmodule = "AddressBookPlugin.py", principalClass = "MOAddressBookPlugin", resources = [], nibname = "dummy", bundlesuffix = ".bundle", ) I'm using PyObjC 1.1b1. ciao Martina |