[Pyobjc-dev] Implementing custom setValue_forKey_
Brought to you by:
ronaldoussoren
|
From: Orestis M. <or...@or...> - 2009-04-03 19:21:09
|
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/
|