[Mono-osx] MonoDevelop and GTK

Francisco Figueiredo Jr. francisco at npgsql.org
Sat May 1 10:26:21 EDT 2010


According to this document:

http://www.mono-project.com/GtkSharpBeginnersGuide

the gui.glade is the name of the resource which is embedded in your
executable. I think it doesn't accept a full path name.

In your first attempt you may only need to check if MonoDevelop is
passing the -resource switch when compiling your project.

>From above documentation:

mcs -pkg:glade-sharp-2.0 -resource:gui.glade glade.cs

I hope it helps.


On Sat, May 1, 2010 at 00:06, bmahf <bmahf at hotmail.com> wrote:
>
> Ok, so I posted too quickly on this.  I found the gui.glade file to be in my
> project directory at
> /Users/me/Projects/Mono/FirstGladeProject/FirstGladeProject/gui.glade.  The
> compiler for the GladeApp class that was created with my project had the
> line:
>
> Glade.XML gxml = new Glade.XML (null, "gui.glade", "window1", null);
>
> Not knowing how this call finds the file, and even though the file is found
> in my project folder, I went ahead and gave the full path reference to the
> file as follows:
>
> Glade.XML gxml = new Glade.XML (null,
> @"/Users/bruce/Projects/Mono/FirstGladeProject/FirstGladeProject/gui.glade",
> "window1", null);
>
> And although it compiles, I still ended up with the following error:
>
> Unhandled Exception: System.ArgumentException: Cannot get resource file
> '/Users/bruce/Projects/Mono/FirstGladeProject/FirstGladeProject/gui.glade'
>
> Now I'm really confused.  It was for a moment there possible that there
> might have been a setting for my project that was not set properly, causing
> the run not to be able to find the gui.glade file, but it should not be
> possible for that to be the case with my having given the full path to the
> file.
>
> Any ideas?  Really at a loss now...
> Bruce
>
> --
> View this message in context: http://mono.1490590.n4.nabble.com/MonoDevelop-and-GTK-tp1548988p2085228.html
> Sent from the Mono - OSX mailing list archive at Nabble.com.
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx
>



-- 
Regards,

Francisco Figueiredo Jr.
Npgsql Lead Developer
http://www.npgsql.org
http://fxjr.blogspot.com
http://twitter.com/franciscojunior


More information about the Mono-osx mailing list