Re: [Pyobjc-dev] Implementing custom setValue_forKey_
Brought to you by:
ronaldoussoren
|
From: Ronald O. <ron...@ma...> - 2009-04-04 16:15:41
|
This is a clear bug in PyObjC. The bug is still present in the trunk, although with a different error message. Ronald On 3 Apr, 2009, at 21:21, Orestis Markou wrote: > Hello, > > I'm trying to subclass an Objective-C class (CALayer) and add my own > setValue_forKey_ to observe changes to specific KVC attributes. > However, I get this obscure message: > > TypeError: Error when calling the metaclass bases > Sorry, cannot create IMP for instances of type > objc.native_selector > > Am I missing something obvious? Here's a minimal repro: > > class CrashTest(NSObject): > def setValue_forKey_(self, v, k): > pass > > I presume that I can use proper KVO to get around this, but I needed > to subclass anyway, so it seemed like a good solution... > > Thanks, > Orestis > -- > or...@or... > http://orestis.gr/ > > > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |