[Gtk-sharp-list] Could someone explain why this is crashing?

Paulo Pires paulo.pires@vodafone.pt
Fri, 18 Mar 2005 20:32:06 +0000


Hi

It works for me. I'm using Mono 1.1.4 and gtk# 1.9.2
I've made a couple changes:

<code>
using Glade;
using Gtk;
using System;

public class TestNewEntry
{
	//[Widget] VBox mainContainer;
	//[Widget] ComboBoxEntry categoryComboEntry;
=09
	public TestNewEntry(string[] args)
	{
		Application.Init();
		XML gxml =3D new Glade.XML("creatnewentry.glade", "window1", null);
		gxml.Autoconnect(this);
		Application.Run();
	}
	public static void Main(string[] args)
	{
		new TestNewEntry(args);
	}
}
</code>



Sex, 2005-03-18 =E0s 07:29 -0800, mikeflippin@blindmindseye.com escreveu:
>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
>(object,object,System.Reflection.BindingFlags
>,System.Reflection.Binder,System.Globalization.CultureInfo)
>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?