Re: [Pyobjc-dev] Access to 'hidden' class-methods
Brought to you by:
ronaldoussoren
From: Ronald O. <ous...@ci...> - 2003-01-12 19:37:08
|
On Sunday, Jan 12, 2003, at 16:08 Europe/Amsterdam, bb...@ma... wrote: > On Sunday, Jan 12, 2003, at 02:16 US/Eastern, Ronald Oussoren wrote: >> Sounds good, but methodForSelector: is simular to description in that >> it is both a class and instance methods, and in your example your >> using the class method. Because of the way the bridge and python are >> working you cannot access the class-method at the moment. > > methodSignatureForSelector_ is only an instance method -- but is also > an instance method on the Class metaobject and, therefore, acts like a > class method? Right. A class is an instance of its meta-class and class-methods are in fact normal methods of the meta-class (the meta-class itself is an instance of NSObject if you compile a normal Objective-C class definitions; it is of course possible to let the meta-class be an instance of another class if you define the class in C). You normally don't notice the existence of the metaclass, unless you start to do lowlevel hacking. Ronald |