[Mono-list] [Problem] Unhandled Exception

=?Big5?B?uXyzzQ==?= huki.tw at gmail.com
Fri Jul 15 09:34:55 EDT 2005


when i remove image1.Pixbuf that line~~~~
can't see errors
please help me~~~~

my code:

using Gtk;
using Glade;
using GtkSharp;
using System.Reflection;

public class test1
{
[Widget] Image image1;
[Widget] Fixed fixed1;

public test1 ()
{
Application.Init();

Glade.XML gxml = new Glade.XML ("./test1.glade", "window1", null);
gxml.Autoconnect (this);
image1.Pixbuf = new Gdk.Pixbuf (null, "icon.png");

Application.Run();
}

public static void Main (string [] args)
{
new test1();
}

public void on_window1_delete_event (object o, DeleteEventArgs args)
{
Application.Quit ();
}
}


error:

[huki at nb-huki ~/test1]$ mcs test1.cs -pkg:glade-sharp -pkg:gtk-sharp
test1.cs(15) warning CS0169: The private field 'test1.fixed1' is never used
Compilation succeeded - 1 warning(s)
[huki at nb-huki ~/test1]$ mono test1.exe

Unhandled Exception: System.ArgumentException: resource must be a valid
resource name of 'assembly'.
in <0x00094> Gdk.Pixbuf:.ctor (System.Reflection.Assembly assembly,
System.String resource)
in <0x00065> test1:.ctor ()
in <0x00016> test1:Main (System.String[] args)


More information about the Mono-list mailing list