[Gtk-sharp-list] A newbie question about using Glade#

Todd Berman tberman@off.net
Wed, 09 Mar 2005 23:02:15 -0800

On Wed, 2005-03-09 at 22:22 -0800, Brad Taylor wrote:
>Hi Mike,
>> Ok, this is probably just a stupid newbie question since I just got 
>> started playing with Glade, but here it goes. Could someone tell me if 
>> this is a bad approach for using Glade. I created a Glade project and 
>> put multiple windows in the same project. Only one of them isn't a modal 
>> dialog box now, but they are all in the same project. Will having all of 
>> those in the same .glade file affect my ability to create a controller 
>> object for each of them that implements the functionality for them? The 
>> reason I ask is that I am a little bit confused about how Glade.XML 
>> defines what is a "root element." Should I put each dialog in a separate 
>> .glade file?
>No, theres no particular reason that you *have* to put all the
>dialogs/windows in the same glade file; separating them out has its
>advantages only in maintainability and readability.
>Glade's "root element" is any Dialog or Window specified in the glade
>file.  Someone correct me if I'm wrong, but you can connect only one
>glade root element to any given class by using the Glade.XML.Autoconnect
>method, or you can optionally index the Glade.XML array to get widgets.

This should remind you of the office, but you are (somewhat) wrong. ;)

In the newest gtk# versions (both 2.0 and 1.0) (however i am not sure if
either is in a released version), this 'bug' has been fixed, so that
multiple BindFields/Autoconnects only set the fields to valid (non-null)
values. However, if you have a widget named the same thing in two
dialogs, and only one attributed widget, it will refer to the latest