[pygtk] how to call a method of GtkWidget by using object of
GtkWindow
Gian Mario Tagliaretti
gianmt at gnome.org
Wed Aug 22 19:12:53 WST 2007
2007/8/20, Hrvoje Nikšić <hrvoje.niksic a avl.com>:
> On Mon, 2007-08-20 at 15:18 +0200, Gian Mario Tagliaretti wrote:
> > gtk_window_show doesn't exist.
>
> Which is why gtk.Window.show is the same as gtk.Widget.show.
It's different, They are equal because of inheritance not because it
doesn't exist.
> Calling SuperClass.method(object_of_subclass) is a common Python idiom.
> In fact, that's how you call the parent method from the overridden
> method.
Again it's not a matter of how python works, that's OOP, we were
talking about a method that *does not exist* so calling
gtk.Widget.show it's a wrong concept.
cheers
--
Gian Mario Tagliaretti
More information about the pygtk
mailing list