[pygtk] gobject.type_register for class hierarchy?

Zsolt Foldvari zsolt.foldvari at nokia.com
Fri Apr 13 17:31:47 WST 2007


ext Skip Montanaro wrote:
> Suppose I have this sort of class relationship:
> 
>     class A(gobject.GObject):
>         def __init__(self):
>             gobject.GObject.__init__(self)
>             ...
> 
>     class B(A):
>         ...
> 
> A is abstract.  Do I need to call gobject.type_register for just A, just B
> or both?
> 
> Thanks,
> 

If you can require pygtk 2.8, no need to call type_register at all. GObjectMeta
does it for you.

Cheers,
Zsolt


More information about the pygtk mailing list