[Pythonmac-SIG] extractClasses and NIB 3.0

Georg Seifert georg.seifert at gmx.de
Tue Jun 3 16:14:34 CEST 2008


Hello,

I try to write a plugin to my app using py2app (the app itself is  
written in ObjectC). My program is targeted for Leopard only so my NIB- 
Files are version 3.x.

it seems, that "NibClassBuilder.extractClasses()" cannot read this NIB  
files as I get the following when loading the bundle:
[..]
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ 
site-packages/PyObjC/PyObjCTools/NibClassBuilder.py", line 134, in  
extractClasses
     self._extractClassesFromNibFromBundle(nibName, bundle)
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ 
python2.4/site-packages/PyObjC/PyObjCTools/NibClassBuilder.py", line  
152, in _extractClassesFromNibFromBundle
     self._extractClassesFromNibFromPath(path)
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ 
python2.4/site-packages/PyObjC/PyObjCTools/NibClassBuilder.py", line  
162, in _extractClassesFromNibFromPath
     raise NibLoaderError, "Invalid NIB file [%s]" % path
PyObjCTools.NibClassBuilder.NibLoaderError: Invalid NIB file [/Users/ 
G.....



Is there a problem with my python installation as is uses the python  
2.4 path ( in the ?

Or are NIB 3.x file not supported
Or do I miss something obvious?


My Python code:

NibClassBuilder.extractClasses("MyWindow", bundle=NSBundle.mainBundle())

class MyExporter(NibClassBuilder.AutoBaseClass):


Thanks
Georg


More information about the Pythonmac-SIG mailing list