On 27-jan-05, at 6:34, Dethe Elza wrote:


On 26-Jan-05, at 8:58 PM, Dethe Elza wrote:
class NSImage(Category(NSImage)):

    def read_(cls, filepath):
        return NSImage.alloc().initWithhContentsOfFile_(filepath)
    read_ = classmethod(read_)

er, that should be initWithContentsOfFile_, but still gets the same error even without the typo.

It's a bug in PyObjC. objc.classAddMethod (which is used by the implementation of Category) doesn't handle classmethods correctly.


Ronald

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to