[Gtk-sharp-list] Embeded File does not work with glade in windows?
Carlos Adriano Portes
xcap2000 at gmail.com
Fri Dec 1 16:43:05 EST 2006
Could you give me an example of such methods?
2006/11/30, Peter Johanson <peter at peterjohanson.com>:
> On Thu, Nov 30, 2006 at 08:15:40PM -0200, Carlos Adriano Portes wrote:
> > I am using visual studio 2003 to develop an aplication, I used glade 3
> > to develop my ui but when I execute the following code I get the
> > following error:
> > code:
> > frmPrincipal = new XML(this.GetType().Assembly,
> > "HegloTransportes.glade", "FormPrincipal", null);
> > frmPrincipal.Autoconnect(this);
> > error:
> > Cannot get resource file 'HegloTransportes.glade'
> > Ok the name of the file is correct, the file is set to be compiled as
> > a resource file, there is nothing more that I remember, could someone
> > point out the problem?
> Sadly, csc/VS name embedded resources including some funky combination
> of directories or somesuch in the resource name when including them. If
> you use monodis or ildasm on the generated assembly, you can see that
> the resource name isn't simply 'HegloTransportes.glade' on windows, but
> probably 'some/path/to/HegloTransportes.glade'. Most of the time you can
> get around this by making some helper method to trim off path names from
> strings before passing them to the Glade.XML methods.
> Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com
More information about the Gtk-sharp-list