[Gtk-sharp-list] Could someone explain why this is crashing?
Fri, 18 Mar 2005 13:11:48 -0500
I commented them out so I could see what would work. Here's an example
of what went wrong for example. I added a Frame named frame1 to it and
put [Widget] Frame frame1; in there just like the tutorial for Glade#
does, and that failed too. It's always stuff that derives from
Gtk.Container that seems to fail on my system.
I am at a loss as to what the problem is because AFAIK I am using the
right names. I have been basically pouring over the monodocs over the
last few days so I can't see how the names aren't being mapped
correctly. I am compiling against package gtk-sharp-2.0 as well in order
to make sure that I'm getting the right namespaces.
Thanks for the input, I'll try Glade.Widget with some of those.
Sergio Duran wrote:
>Well that error usually happends when you define an Widget in glade of
>a certain type and then in your C# code you define it as a different
>Your widgets are commented, did you try [Glade.Widget] instead of [Widget]?
>Try removing some widgets to see which one is causing problems, I'd
>play with the GtkEntry first.
>What version of gtk# are you using?
>Sorry if I can't debug your code, but my boss would get mad if I dont
>finish today with my code :)
>On Fri, 18 Mar 2005 07:29:20 -0800 (PST),
>firstname.lastname@example.org <email@example.com> wrote:
>>I get this exception every time I try to a combo box, or anything else
>>that is derived from Gtk.Container.
>>Unhandled Exception: System.ArgumentException: Object type cannot be
>>converted to target type.
>>Parameter name: val in <0x000b6> System.Reflection.MonoField:SetValue
>>in <0x00173> Glade.XML:BindFields (object,System.Type)
>>in <0x00019> Glade.XML:BindFields (object)
>>in <0x00016> Glade.XML:Autoconnect (object)
>>in <0x00047> TestNewEntry:.ctor (string)
>>in <0x00027> TestNewEntry:Main (string)
>>Could someone explain what is going on here?