RE: [gtk-list] Code generation for GTK+ apps




> On the subject of code generation from higher level tools, the problem
> always arises where you want to be able to add tweaks to the generated
> code, but not have them clobbered when the higher level tool regenerates
> the code. Some high level tools try to solve this by allowing the tweaks
> to be defined up at the IDE layer, but the end result is usually a
> restricted development environment and a bloated binary (vis Visual
> Basic, 4GL's, etc). There is simply no substitute for loading up raw
> source code in vi or emacs and doing what has to be done.

When Glade's C source generator is finished, I hope it will be fairly easy
to tweak the code. The generator will output 2 types of files:

 - files which contain functions to create user interface components
   (windows/dialogs). These files should not be touched by the developer.
   The developer calls these functions from another source
   file (which Glade doesn't touch), and can tweak the created component to
   their hearts desire, before showing it. In fact, to use lists/clists etc.
   the developer will have to add code here to insert the list elements,
since
   Glade doesn't support them and they probably need to be created
dynamically
   anyway.

 - files which contain signal handler prototypes, which the developer fills
in.
   If the interface is later updated, and the source regenerated, Glade will
only
   append to this file. It will add any new, or updated, signal handler
prototypes.
   So none of the developer's code will get clobbered. But the developer is
   responsible for clearing out any old signal handlers which are no longer
used.

I hope this will be enough for most cases.

Damon




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