[Gtk-sharp-list] More than one Glade resource file? (Is it possible?)

Adam Tauno Williams awilliam@whitemice.org
Wed, 15 Sep 2004 20:13:08 -0400


Is it possible to have more than one glade resource file in the context
of a process?

I built a library that contains a glade resource file (say "xyz.glade")
and code for a bunch of common dialogs used be a set of applications.

Then I made an executable project that includes the library and also has
its own resource file (say "abc.glade").

The application can create windows defined in the library just fine.

Glade.XML gxml = new Glade.XML (null, "xyz.glade",  "dialog_common",
null);

But if it tries to create a window defined in it's own resource file...
Glade.XML gxml = new Glade.XML (null, "abc.glade",  "dialog_special",
null);
... it dies with an "Unhandled Exception: System.ArgumentException:
Cannot get resource file 'abc.glade'" error.

So I tried just having both resource files have the same
name...Glade.XML gxml = new Glade.XML (null, "abc.glade", 
"dialog_special", null);
.... but then it spits out an "(<unknown>:5284): libglade-CRITICAL **:
file glade-xml.c: line 1172 (glade_xml_build_interface): assertion `wid
!= NULL' failed" message and no window appears although the program
continues to run.

Is this possible?

gtk-sharp-1.0-1.ximian.9.0
mono-core-1.0.1-1.ximian.9.1
glade-2.0.1-47