[Gtk-sharp-list] Extending Gtk.Window

Miguel de Icaza miguel@ximian.com
Tue, 25 Nov 2003 11:51:09 -0500


> 2. Like question 1, I found a code (GladesharpTest.cs) that uses derives
> from Gtk.Window and uses a Glade File to load the GUI so I get confused
> :(, the code:
> http://cvs.freax.be/cgi-bin/cvsweb/GladeSharpTest/GladeSharpTest.cs?rev=1.4&content-type=text/x-cvsweb-markup

The code there is not buggy, but it has a hidden behavior: notice that
the declaration for the Window pointer is not of type MainWindow, it is
of type Window.

Also the window that gets shown is the one loaded by Glade, not the
MainWindow (it is in fact hidden, add a "Show" at the end of the
constructor, and you will see two windows on the screen).

That code does not use the actual Window object being created, it is
just a shell.  It should in fact remove the ": Gtk.Window" inheritance