Re: [pygtk] GTK_IS_WIDGET on subclass of a widget fails

2009-05-22 Thread Jeffrey Finkelstein
Kelvin Ho wrote: > Have a look at this: > > http://fuhm.net/super-harmful/ > > ;) > Interesting...so what can _I_ do then? This seems like a problem above me... ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Rea

Re: [pygtk] GTK_IS_WIDGET on subclass of a widget fails

2009-05-21 Thread Jeffrey Finkelstein
Christian Becke wrote: > > I think you have to call the constructor of the parent object here: > def __init__(self): > HBox.__init__(self) > and you have to make your new widget known: > import gobject > gobject.type_register (FooBox) > Thanks Christian, and Jeffrey, that hel

[pygtk] GTK_IS_WIDGET on subclass of a widget fails

2009-05-21 Thread Jeffrey Finkelstein
I'm new to Gtk. I tried to create a subclass of an HBox and add it to a window, but I get a GtkWarning telling me that the assertion `GTK_IS_WIDGET()' fails on the instance of my subclass. For example: ===code=== from gtk import Window, HBox, WINDOW_TOPLEVEL, main class FooBox(HBox): def