[Gtk-sharp-list] Exception with Gtk.combo
Miguel
26031@t-link.de
Mon, 28 Jun 2004 19:24:40 +0200
Hi,
you have to make a instance from every widget.
Not only from button.
So
[Glade.Widget] Button button1;
[Glade.Widget] Combo combo1;
do the trick.
Greetings
Michael
On Mon, 2004-06-28 at 18:55, Christoph Schweda wrote:
> Hello,
>
> I have tested the Mono Handbook example for glade. It works fine, but
> after adding a combo field and reading the text of it, I got an
> exception. I don't know if it is a bug or my mistake. The code is
> attached with the email.
>
> The exception after clicking the button:
> =======================================================================
> Unhandled Exception: System.NullReferenceException: Object reference not
> set to an instance of an object
> in [0x0000b] (at /home/chris/devel/Mono/gDVBszap/Main.cs:94)
> GladeSamples.GladeTest:on_button1_clicked (object,System.EventArgs)
> in <0x0006a> (wrapper delegate-invoke)
> System.MulticastDelegate:invoke_void_object_EventArgs
> (object,System.EventArgs)
> in <0x00120> GtkSharp.voidObjectSignal:voidObjectCallback (intptr,int)
> in <0x00055> (wrapper native-to-managed)
> GtkSharp.voidObjectSignal:voidObjectCallback (intptr,int)
> in (unmanaged) (wrapper managed-to-native) Gtk.Application:gtk_main ()
> in <0x00004> (wrapper managed-to-native) Gtk.Application:gtk_main ()
> in <0x00007> Gtk.Application:Run ()
> in [0x00023] (at /home/chris/devel/Mono/gDVBszap/Main.cs:87)
> GladeSamples.GladeTest:.ctor (string[])
> in [0x00001] (at /home/chris/devel/Mono/gDVBszap/Main.cs:74)
> GladeSamples.GladeTest:Main (string[])
> =======================================================================
>
> Thanks
> Christoph