Re: GUI programming vs encapsulation

2005-02-05 Thread Roger Leigh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Daniel Haude <[EMAIL PROTECTED]> writes: [Code organisation] > 1. Separate source files for each dialog. > -> unpractical because this is a single Glade project, and Glade > only writes single source files. That's true. You could have a separate

Re: GUI programming vs encapsulation

2005-02-04 Thread Keith Sharp
On Fri, 2005-02-04 at 09:23 -0500, John (J5) Palmieri wrote: > C's not flat. Use gobject or at least structs to organize your code. > Never use globals and only use static variables sparingly. Look how > other large projects organize their code. Open Source is good in that > way. Usually larg

RE: GUI programming vs encapsulation

2005-02-04 Thread Prewitt, Nathan C ERDC-ITL-MS Contractor
-Original Message- >From: Daniel Haude >To: gtk-app-devel-list@gnome.org >Sent: 2/4/05 3:54 AM >Subject: GUI programming vs encapsulation > >Hello list, > >as my Glade/GTK project is growing larger, I find myself confronted with > >code organization issues

Re: GUI programming vs encapsulation

2005-02-04 Thread Daniel Haude
Thanks, Gus, and everybody else, for your suggestions. I wasn't actually /worried/ that my program would suffer a performance hit by permanently habing to dig trough widget lists by name, it was just a matter of taste thing. But I guess it's the best way to keep the code clean. --Daniel ___

Re: GUI programming vs encapsulation

2005-02-04 Thread John (J5) Palmieri
On Fri, 2005-02-04 at 04:54, Daniel Haude wrote: > Hello list, > > as my Glade/GTK project is growing larger, I find myself confronted with > code organization issues. I have all my callbacks in a single file, but > of course there are groups of related widgets that logically go together > (say

Re: GUI programming vs encapsulation

2005-02-04 Thread Andrej Prsa
Hi, > So how do you guys deal with this problem? I guess there is no real > way out of having all the callbacks spread out in this "flat" fashion > because from the C program's point of view there's no telling in what > order they might be called. Is writing unwieldy spaghetti code a > necessar

Re: GUI programming vs encapsulation

2005-02-04 Thread Gus Koppel
Zeeshan Ali wrote: > > Is writing unwieldy spaghetti code a > > necessary part of GUI programming, or have I missed some important > > point? > > Yes, the important point you missed is that Glade is not meant to > generate code for you. You can use it for that purpose if you want to > but you

Re: GUI programming vs encapsulation

2005-02-04 Thread Gus Koppel
Daniel Haude wrote: > as my Glade/GTK project is growing larger, I find myself confronted > with code organization issues. I have all my callbacks in a single > file, but of course there are groups of related widgets that logically > go together (say, the widgets inside a top-level dialog window).

Re: GUI programming vs encapsulation

2005-02-04 Thread Zeeshan Ali
Hello, > Is writing unwieldy spaghetti code a > necessary part of GUI programming, or have I missed some important point? Yes, the important point you missed is that Glade is not meant to generate code for you. You can use it for that purpose if you want to but you'll end-up in problems like

GUI programming vs encapsulation

2005-02-04 Thread Daniel Haude
Hello list, as my Glade/GTK project is growing larger, I find myself confronted with code organization issues. I have all my callbacks in a single file, but of course there are groups of related widgets that logically go together (say, the widgets inside a top-level dialog window). Also the widg