GNOME Bugzilla – Bug 470718
propertyhelper don't let you subclass
Last modified: 2007-08-27 16:01:56 UTC
GobjectMeta check for do_(get|set)_property. the base class does not have such methods so the metaclass creates they. then the subclass inherits both methods and the meta class check for prop.getter which doesn't exists. this is because how metaclasses work: they execute the body of the class in a temporary dictionary. the metaclass sees the property but it's not initialized yet and doesn't have the getter attribute.
Created attachment 94437 [details] a test
i was wong about the motivation: in gobject.__init__.py:63 there is a loop in a dictionary. for prop in props: prop is the key of the dictionary. also the value is not what you expect: isn't a gobject.property but a tuple (see the line 51) props[name] = prop.get_pspec_args() so both the key and the value don't have getter, setter, default_getter, default_setter attributes
Thanks for the bug report, I committed a fix for this to rev 699.