[Mono-list] Glade# with Pixmap!?

Moritz Angermann moritz.angermann@gmx.net
Mon, 15 Mar 2004 18:12:43 +0100


ohh well, figured it out myself.
Looks like you have to give the pixmap the full path.
So instead of image.ext, /path/to/pixmaps/image.ext

But this is, in my opinion quite burdensome to rewrite my .glade 
file each time...

anyone?

-mo


On Mon, 2004-03-15 at 00:24, Moritz Angermann wrote:
> Hi All,
> So I built up a gui in Glade-2.
> And did an
> ---
> Glade.XML gxml = new Glade.XML( null, "gui.glade", "wMain", null );
> gxml.Autoconnect( this );
> ---
> 
> basically this works...
> but when I have an GtkImage with an Image, I get as result when starting
> up:
> ===
> (<unknown>:1261): GLib-CRITICAL **: file gutils.c: line 574
> (g_path_get_dirname): assertion `file_name != NULL' failed
>  
> (<unknown>:1261): GLib-CRITICAL **: file gstrfuncs.c: line 232
> (g_strconcat): assertion `string1 != NULL' failed
>  
> (<unknown>:1261): GdkPixbuf-CRITICAL **: file gdk-pixbuf-io.c: line 729
> (gdk_pixbuf_new_from_file): assertion `filename != NULL' failed
>  
> Unhandled Exception: System.NullReferenceException: A null value was
> found where an object instance was required
> in (unmanaged) (wrapper managed-to-native)
> Glade.XML:glade_xml_new_from_buffer (byte[],int,string,string)
> in <0x00004> (wrapper managed-to-native)
> Glade.XML:glade_xml_new_from_buffer (byte[],int,string,string)
> in <0x00105> Glade.XML:.ctor
> (System.Reflection.Assembly,string,string,string)
> in <0x00047> .gui:.ctor ()
> in <0x00023> .MainClass:Main (string[])
> ===
> 
> As it, if I understand this correct, sais: the file( here I guess the
> pixmap is ment ) is not found.
> 
> I also tried to track some example app. But wasn't successful...
> does anyone have an example on how to do this?
> 
> kindest regards,
>  -mo
-- 
----------------  contact info  ----------------
Moritz Angermann       	moritz.angermann@gmx.net
Liquid:Mint            	www.liquidmint.org
Mobile                 	+49 (0) 160 9197 5880
Home                   	+49 (0) 4322 75 12 66