[Gtk-sharp-list] Is this a bug?

mikeflippin@blindmindseye.com mikeflippin@blindmindseye.com
Thu, 17 Mar 2005 12:35:41 -0800 (PST)

I have a glade file with 2 ComboBox objects in it. My NAnt build file
works fine and is set to link against the package gtk-sharp-2.0 which
according to the monodocs contains the ComboBox class. My Mono runtime is
the Windows Integration build from forge.novell.com, and so I have Gtk#
2.0 installed, along with Glade# 2.0 and Gecko#. Now, when I try to load
the Glade file with the 2 ComboBoxes, I get the following exception:

Unhandled Exception: System.InvalidCastException: Cannot cast from source
type to destination type.
in <0x0012e> GLib.ObjectManager:CreateObject (intptr)
in <0x000b8> GLib.Object:GetObject (intptr,bool)
in <0x0000c> GLib.Object:GetObject (intptr)
in <0x0003b> Glade.XML:GetWidget (string)
in <0x0015a> Glade.XML:BindFields (object,System.Type)
in <0x00019> Glade.XML:BindFields (object)
in <0x00016> Glade.XML:Autoconnect (object)
in <0x00047> BlogSharp.Gui.ConfigDialog:.ctor
in <0x0002a>
in <0x00041> (wrapper delegate-invoke)
System.MulticastDelegate:invoke_void_object_EventArgs (o
in <0x000b6> GtkSharp.voidObjectSignal:voidObjectCallback (intptr,int)
in <0x00026> (wrapper native-to-managed)
GtkSharp.voidObjectSignal:voidObjectCallback (intptr,int)
in (unmanaged) 02113645
in <0x00004> (wrapper managed-to-native) Gtk.Application:gtk_main ()
in <0x00007> Gtk.Application:Run ()
in <0x00099> BlogSharp.Loader:Main (string[])

Here is the offending code in my program:

		[Widget] ComboBox profileCombo;
		[Widget] ComboBox blogTypeCombo;

That code is define outside of the constructor of the object that is
connected to the glade file, along with all of the other references to
objects in the glade file. When I make those ComboBoxes into ComboEntries,
the object works just fine when linked to either gtk# 1.0 or 2.0. When
ComboBoxes, it fails every time when I load that dialog.

Is this a bug or am I just doing something wrong here?