[Mono-list] Building GUI with glade not working

Fabian Salamanca Dominguez fsalaman at gmail.com
Wed Oct 5 22:42:21 EDT 2005


Hi!

I created a test GUI with Glade in Windows and then I tried to build a mono
(1.1.8) app with that GUI using the following code:

//*******************
using System;
using Gtk;
using Glade;

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

public GladeApp (string[] args)
{
Application.Init();

Glade.XML gxml = new Glade.XML (null, "gui.glade", "GUI2", null);
gxml.Autoconnect (this);
Application.Run();
}

/* Connect the Signals defined in Glade */
public void OnWindowDeleteEvent (object o, DeleteEventArgs args)
{
Application.Quit ();
args.RetVal = true;
}
}
//****************

And I got the following error:

Unhandled Exception: System.ArgumentException: Cannot get resource file '
gui.gla
de'
Parameter name: resource_name
in <0x00119> Glade.XML:.ctor (System.Reflection.Assembly assembly,
System.String
resource_name, System.String root, System.String domain)
in <0x00035> GladeApp:.ctor (System.String[] args)
in <0x00019> GladeApp:Main (System.String[] args)

What am I doing wrong?

thanks!


--
~Fabian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20051005/fa69f7aa/attachment.html


More information about the Mono-list mailing list