Hi,

I have a question about PyObjC.  I used XCode to build a bundle  
(written in Objective C) which I then placed in the resources  
directory of an XCode PyObjC application and added to that project.   
I build the application from the command line with either of these  
two lines:

/usr/local/bin/python setup.py py2app
/usr/local/bin/python setup.py py2app -A


With -A, when I load the bundle and look for the principal class it  
works fine:

self.threadBundle = NSBundle.bundleWithPath_('Threaded.bundle')
self.threadBundle.load()
principalClass = self.threadBundle.principalClass()


Without the -A flag, the bundle loads, but the last call returns  
None, and this fails also:

namedClass = self.threadBundle.classNamed_('threaded')


If I modify the info.plist of the Threaded.bundle to add this:
NSPrincipalClass = threaded

Now I can build the standalone app and it works.  What's the correct  
way to do this?

Thanks for any help.

Tom Elliott
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to