[Gtk-sharp-list] Glade# Pixmap Resource

Rafael Teixeira Rafael Teixeira <monoman@gmail.com>
Fri, 18 Feb 2005 15:57:14 -0200


Normally is a one-liner to do things programatically, but I would love
to have Glade# extended to deal with embedded resources.

On Tue, 15 Feb 2005 22:56:12 +0000, Samuel Kaufman <emrysk@gmail.com> wrote:
> My project has a PNG embedded as a resource in the executable assembly.
> I'm trying to use that PNG on a window in a Glade# project, where
> gui.glade is also a resource in the assembly.  It doesn't look like
> Glade.XML is managing to find the the PNG on it's own.  How can I get it
> to find this pixmap?  Is there a clean way to do it without using code
> to manually drop the pixmap onto the window?
> I get the following output.
> (<unknown>:10500): GLib-CRITICAL **: g_path_get_dirname: assertion
> `file_name != NULL' failed
> (<unknown>:10500): GdkPixbuf-CRITICAL **: 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 <0x00133> Glade.XML:.ctor
> (System.Reflection.Assembly,string,string,string)
> in [0x00012] (at /home/emrys/Projects/Gust/MainWindow.cs:54)
> Gust.MainWindow:.ctor ()
> in [0x00045] (at /home/emrys/Projects/Gust/Program.cs:39)
> Gust.Program:.ctor (Gust.InterfaceType)
> in [0x00001] (at /home/emrys/Projects/Gust/Program.cs:28)
> Gust.Program:Main ()
> free(): invalid pointer 0x8319000!
> Thanks in advance.

Rafael "Monoman" Teixeira
I'm trying to become a "Rosh Gadol" before my own eyes. 
See http://www.joelonsoftware.com/items/2004/12/06.html for enlightment.