Re: Glade vs Hand code



On Wed, 2007-03-21 at 18:08 +1100, Andrew Cowie wrote:
[...]
> So then in a new application I decided "well, forget Glade" and started
> doing everything programmatically. And then I realized that I was having
> to deal with coming up with variable names for each and every bloody
> Label, and that was a real pain in the ass.
> 
> So the conclusion I settled on was to use Glade for as much scaffolding
> as possible, thus saving the object pressure of proxies being created
> for not much at all, but not to try and do anything even remotely
> complicated in Glade, preferring to hand off and switch to code at that
> point.

This sounds alot like how I usually use glade (and I do use very complex
projects, containing multiple toplevels all with complex
subhierarchies).

Basically I usually use an object/struct that defines that part of the
interface (usually its by toplevel - see the devhelp application code
for a very good example of the same technique) and I just resolve the
members that I need at load time - unref the GladeXML and connect
to any signals.

I agree & disagree with David, I think glade is fine for huge complex
projects but I do agree that glade is not right for data driven
parts of the interface - in which case you'll always need code
to generate the interface well. otoh a good combination can be found,
for instance you can use glade to create a template subhierarchy
that represents only one element of a list - your data-driven
program then uses glade to generate that for each item as you
pull them out of a DB or whatever (ofcourse this particular 
design is not good for huge datasets but its just an example :) ).

Cheers,
                   -Tristan





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]