Re: [Pyobjc-dev] PyObjC & RubyCocoa in a single app
Brought to you by:
ronaldoussoren
|
From: Bill B. <bb...@ma...> - 2007-11-25 17:45:39
|
On Nov 25, 2007, at 6:21 AM, Ronald Oussoren wrote: > On 25 Nov, 2007, at 6:58, Bill Bumgarner wrote: > >> Yes, it works. Sort of. >> >> http://www.friday.com/bbum/2007/11/25/can-ruby-python-an-objective-c-co-exist-in-a-single-application/ >> >> The biggest issue is that both RubyCocoa and PyObjC assume that no >> one >> else [in their right mind :)] might have loaded the BridgeSupport >> dylibs. > > PyObjC just does: > dlopen(dylibPath, RTLD_LAZY); > > (without any error checking). Shouldn't that just work fine even > when RubyCocoa has already loaded the dylib? > > Patches to make this work nicer are welcome ;-) I'll try to fix it later today. Zoo first. The example lives in a Svn repository for a reason -- I'll cut branches of it to track cleaner versions against non-Leopard baselines of RubyCocoa, PyObjC and, eventually, CamelBones (and whoever else wants to join the party). Note that RubyCocoa fails in the same way. Removing one of the stupid exception suppressors for the moment, the full exception barfed up is this: Traceback (most recent call last): File "/tmp/bbum-products/Release/PyRu.app/Contents/Resources/ main.py", line 11, in <module> import Foundation File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/Foundation/__init__.py", line 10, in <module> File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/CoreFoundation/__init__.py", line 17, in <module> File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/PyObjC/objc/_bridgesupport.py", line 129, in initFrameworkWrapper _parseBridgeSupport(data, globals, frameworkName, dylib_path) File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/PyObjC/objc/_bridgesupport.py", line 53, in _parseBridgeSupport objc.parseBridgeSupport(data, globals, frameworkName, *args, **kwds) objc.error: CFXMLParserRef is overriding existing Objective-C class 2007-11-25 09:44:50.811 PyRu[16076:10b] /Volumes/Data/developer- external/bbum-red-bean/trunk/hacques/Silly/PyRu/AppDelegate.m:48 main() PyRun_SimpleFile failed with file '/tmp/bbum-products/Release/ PyRu.app/Contents/Resources/main.py'. See console for errors. |