mail-archives/mono-osx/2010-May/002906.html

124 строки
5.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mono-osx] MonoDevelop and GTK
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:mono-osx%40lists.ximian.com?Subject=%5BMono-osx%5D%20MonoDevelop%20and%20GTK&In-Reply-To=1272683209577-2085228.post%40n4.nabble.com">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Next" HREF="002909.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mono-osx] MonoDevelop and GTK</H1>
<B>Francisco Figueiredo Jr.</B>
<A HREF="mailto:mono-osx%40lists.ximian.com?Subject=%5BMono-osx%5D%20MonoDevelop%20and%20GTK&In-Reply-To=1272683209577-2085228.post%40n4.nabble.com"
TITLE="[Mono-osx] MonoDevelop and GTK">francisco at npgsql.org
</A><BR>
<I>Sat May 1 10:26:21 EDT 2010</I>
<P><UL>
<LI>Next message: <A HREF="002909.html">[Mono-osx] MonoDevelop and GTK
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#2906">[ date ]</a>
<a href="thread.html#2906">[ thread ]</a>
<a href="subject.html#2906">[ subject ]</a>
<a href="author.html#2906">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>According to this document:
<A HREF="http://www.mono-project.com/GtkSharpBeginnersGuide">http://www.mono-project.com/GtkSharpBeginnersGuide</A>
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.
&gt;<i>From above documentation:
</I>
mcs -pkg:glade-sharp-2.0 -resource:gui.glade glade.cs
I hope it helps.
On Sat, May 1, 2010 at 00:06, bmahf &lt;<A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">bmahf at hotmail.com</A>&gt; wrote:
&gt;<i>
</I>&gt;<i> Ok, so I posted too quickly on this. &#160;I found the gui.glade file to be in my
</I>&gt;<i> project directory at
</I>&gt;<i> /Users/me/Projects/Mono/FirstGladeProject/FirstGladeProject/gui.glade. &#160;The
</I>&gt;<i> compiler for the GladeApp class that was created with my project had the
</I>&gt;<i> line:
</I>&gt;<i>
</I>&gt;<i> Glade.XML gxml = new Glade.XML (null, &quot;gui.glade&quot;, &quot;window1&quot;, null);
</I>&gt;<i>
</I>&gt;<i> Not knowing how this call finds the file, and even though the file is found
</I>&gt;<i> in my project folder, I went ahead and gave the full path reference to the
</I>&gt;<i> file as follows:
</I>&gt;<i>
</I>&gt;<i> Glade.XML gxml = new Glade.XML (null,
</I>&gt;<i> @&quot;/Users/bruce/Projects/Mono/FirstGladeProject/FirstGladeProject/gui.glade&quot;,
</I>&gt;<i> &quot;window1&quot;, null);
</I>&gt;<i>
</I>&gt;<i> And although it compiles, I still ended up with the following error:
</I>&gt;<i>
</I>&gt;<i> Unhandled Exception: System.ArgumentException: Cannot get resource file
</I>&gt;<i> '/Users/bruce/Projects/Mono/FirstGladeProject/FirstGladeProject/gui.glade'
</I>&gt;<i>
</I>&gt;<i> Now I'm really confused. &#160;It was for a moment there possible that there
</I>&gt;<i> might have been a setting for my project that was not set properly, causing
</I>&gt;<i> the run not to be able to find the gui.glade file, but it should not be
</I>&gt;<i> possible for that to be the case with my having given the full path to the
</I>&gt;<i> file.
</I>&gt;<i>
</I>&gt;<i> Any ideas? &#160;Really at a loss now...
</I>&gt;<i> Bruce
</I>&gt;<i>
</I>&gt;<i> --
</I>&gt;<i> View this message in context: <A HREF="http://mono.1490590.n4.nabble.com/MonoDevelop-and-GTK-tp1548988p2085228.html">http://mono.1490590.n4.nabble.com/MonoDevelop-and-GTK-tp1548988p2085228.html</A>
</I>&gt;<i> Sent from the Mono - OSX mailing list archive at Nabble.com.
</I>&gt;<i> _______________________________________________
</I>&gt;<i> Mono-osx mailing list
</I>&gt;<i> <A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">Mono-osx at lists.ximian.com</A>
</I>&gt;<i> <A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">http://lists.ximian.com/mailman/listinfo/mono-osx</A>
</I>&gt;<i>
</I>
--
Regards,
Francisco Figueiredo Jr.
Npgsql Lead Developer
<A HREF="http://www.npgsql.org">http://www.npgsql.org</A>
<A HREF="http://fxjr.blogspot.com">http://fxjr.blogspot.com</A>
<A HREF="http://twitter.com/franciscojunior">http://twitter.com/franciscojunior</A>
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Next message: <A HREF="002909.html">[Mono-osx] MonoDevelop and GTK
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#2906">[ date ]</a>
<a href="thread.html#2906">[ thread ]</a>
<a href="subject.html#2906">[ subject ]</a>
<a href="author.html#2906">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.ximian.com/mailman/listinfo/mono-osx">More information about the Mono-osx
mailing list</a><br>
</body></html>