Re: [Pyobjc-dev] Confused on syntax
Brought to you by:
ronaldoussoren
From: Deirdre S. M. <de...@de...> - 2001-04-27 18:55:30
|
>That won't work for the same reason you can't directly >subclass Python lists or dictionaries. They are objects, >but not classes. Look in you're Python lib for UserDict.py >and UserList.py -- which are examples of class wrappers >around a non-class object. You would need to do something >similar for Cocoa classes -- which are not Python classes. Yeah, figured that out from your prior email. Rats. So much for cheap and easy. :) > We're going to look for a general solution to this problem: >Jim Fulton and Don Beaudry both (I think) did some work on >"extension classes" and other ways around this problem in >Python -- and I think Python is moving towards a more >general solution eventually. > We might try fixing it without waiting for Python 2.X to >fix the problem (looking at those previous attempts). > We might be able to add more introspection to the bridge >to make it easier to automatically generate, or make a >generic one-size-fits-all class wrapper. It seems to me that somehow it could be done if one really compiled python with ObjC (this is intuition) and tweaked the process of building a bit. Failing that, the generic wrapper sounds like a good approach. > I haven't yet been able to load and reanimate an IB Nib file >from Python. I think this is a much easier problem than [1] >above. I'll try to post what I've tried and what didn't work >in case anyone else wants to give it a try. Please -- it's a dull afternoon. :) -- -- _Deirdre Stash-o-Matic: http://weirdre.com http://deirdre.net "I love deadlines. I like the whooshing sound they make as they fly by." - Douglas Adams |