Re: [Pyobjc-dev] Inheritance questions....
Brought to you by:
ronaldoussoren
From: Ronald O. <ron...@ma...> - 2004-04-15 05:15:03
|
On 14-apr-04, at 23:32, Bob Ippolito wrote: > >> def getFrameFromPaperSize(self, size): >> return ((0, 0), (10, 10)) > > def getFrameFromPaperSize_(klass, size): > return ((0, 0), (10, 10)) > # this should technically have a signature that returns NSRect and > takes NSSize. Changing the signature is only necessary when the method will be called from Objective-C *and* PyObjC cannot know the signature (you never have to supply an explicit signature when overriding an existing method). > # I'll leave that as an exercise to the reader > getFrameFromPaperSize_ = selector(getFrameFromPaperSize_, > isClassMethod=True) or: getFrameFromPaperSize_ = classmethod(getFrameFromPaperSize_) -- X|support bv http://www.xsupport.nl/ T: +31 610271479 F: +31 204416173 |