[Pythonmac-SIG] Re: NSObject.self(): Never mind
Ronald Oussoren
ronaldoussoren at mac.com
Mon Nov 8 08:37:02 CET 2004
On 7-nov-04, at 9:44, Dethe Elza wrote:
> Well, I figured out the problem with
> loadGSMarkupFile_externalNameTable_withZone_. There is a class method
> with that signature, that I *thought* I was calling, and an instance
> method with that signature which I was *actually* calling, thus it
> wanted an NSBundle for the self parameter. Doh!
That's the only hard TODO item in PyObjC at the moment, caused by a
semantic mismatch between Python and Objective-C. In Python instance
and class methods live in the same name space, while they are in
different namespaces in Objective-C. If a ObjC class has a class and
instance method with the same name you currently have to do some extra
work to access the class method, because the instance method is found
first. It should be possible to work around this, but nobody got around
to work on that yet.
This issue is really annoying when a class has an undocumented instance
method with the same name as a documented class method :-(
Ronald
--
X|support bv http://www.xsupport.nl/
T: +31 610271479 F: +31 204416173
More information about the Pythonmac-SIG
mailing list