[Gtk-sharp-list] Extending Gtk.Window
Pablo Fischer
pablo@pablo.com.mx
Thu, 20 Nov 2003 16:10:30 -0600
Hi!
El jue, 20-11-2003 a las 15:37, Miguel de Icaza escribi=F3:
> There are a few problems with your code:
>=20
> * The instance that is created by Glade is not of type AccountsWindow,
> it is of type `Window'.
You are telling me about this lines:
accountsWindow =3D (Gtk.Window)ui["accountsWindow"];
this =3D accountsWindow;
right?.
If yes, I'm sorry to upload the file with that error, It should not have 't=
his =3D accountsWindow'.=20
>=20
> * You are not allowed to assign to `this', MCS flags that as an error,
> you might be using an old version, and that explains the corruption.
So, the best option is to never use 'this', right? And if I'm extending
my application from another Class and want to use properties or members
of the extended class I should use them like: Visible and not like
this.Visible?
> I would suggest that you do have a container class that holds all the
> information, but does not necessarily derive from Window:
>=20
> class AccountsWindow {
> [GtkWidget] Window accountsWindow;
>=20
> public AccountsWindow ()
> {
> Glade.XML gui =3D new Glade.XML (...);
> gui.AutoConnect (this);
> }
> }
Ok, So, the question is: When to derive from a Gtk.Object?.. When I'm
using a glade file or when Im coding 'on the fly'?.
Thanks!
>=20
> _______________________________________________
> Gtk-sharp-list maillist - Gtk-sharp-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
--=20
Pablo Fischer Sandoval (pablo [arroba/at] pablo.com.mx)
http://www.pablo.com.mx
http://www.debianmexico.org
GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C
Firma URL: http://www.pablo.com.mx/firmagpg.txt