[Pythonmac-SIG] a word of warning for pyobjc users

Ronald Oussoren ronaldoussoren at mac.com
Wed Feb 23 22:42:10 CET 2011


On 23 Feb, 2011, at 17:48, has wrote:

> Kevin Walzer wrote:
> 
> On 2/22/11 8:27 AM, Ronald Oussoren wrote:
>> 
>>> Don't install Xcode 4 when you use PyObjC for your GUIs and want to use Interface Builder.  The Interface Builder that's included with Xcode 4 no longer supports Python.
>>> 
>>> I've filed a bug in Apple's tracker, but I have no idea if that will have any effect at all. It'll probably not help a lot, I filed the same bug just after WWDC last year and that didn't help either.
>> 
>> Unbelievable. Apple's "scripting bridge" push,
> 
> You mean BridgeSupport (http://bridgesupport.macosforge.org/), which
> provides XML descriptions of the non-introspectable bits of Cocoa APIs
> for easy consumption by PyObjC, MacRuby, etc.

There's also the Cocoa Scripting Bridge <http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ScriptingBridgeConcepts/Introduction/Introduction.html>, which is simular to objc-appscript in scope.

The BridgeSupport project is a mess, the specification is too lax to be useful. PyObjC uses its own variation of those files because there are slight diffferences in the semantics that RubyCocoa and PyObjC expect, even though I worked with Laurent on the initial version of these files.   Current PyObjC versions diverge slightly further to be able to add more useful information to the bridgesupport files, and future versions might move to something else altogether.

> 
> 
>> its claim of full Cocoa support for Python, Ruby, etc. seems hard to believe now.
> 
> I would suggest dropping a note to Laurent Sansonetti (BridgeSupport +
> MacRuby lead) and other bridge & runtime devs
> (http://www.cocoadev.com/index.pl?CocoaBridges)
> (http://www.cocoadev.com/index.pl?CocoaLanguages) to find out if
> they're also affected. Laurent may also be in a marginally better
> position to agitate, seeing as he's an Apple employee.
> (http://www.macruby.org/)

Ruby seems to be affected as well (although I'm not sure if I use the right syntax).

> 
> 
>> What other options are there? Specify your GUI by hand?
> 
> Is it just the Read/Write Class Files functionality that's affected,
> or has Xcode 4 also lost the ability to specify IB classes manually?
> (IB 2 was good at this; IB 3 not so good but I think it was still
> possible.)

I haven't found a way to do "Read Class Files", probably because IB is now part of the Xcode IDE and no longer a standalone program (which means IB immediately knows when files are added or updated). 

There are probably good technical reasons why it is no longer easy to support scripting languages in IB, but the new behavior sucks nonetheless.


Ronald



More information about the Pythonmac-SIG mailing list