[Glade-devel] Re: glade code generation



On Wed, 2003-02-26 at 15:27, Owen Taylor wrote:
 Don't use glade to generate code, use libglade!

I tend to agree, with one important caveat:  code generators are useful
for creating the callback stubs file(s).  

(Note that there may be resistance from the people who have written
 code generation plugins for various languages, but I think the 
 same basic principle applies there. If you don't have excellent
 IDE integration, you don't want to generate code. Maybe not 
 even then.)

I wrote a simple stubs file generator for Java-GNOME's libglade
support.  It reads a glade XML file and generates a Java source file
which lists all the event handler callbacks with the correct types and
necessary import statements.  This utility eliminates a lot of
boilerplate code entry, and avoids runtime exceptions from missing event
handlers.  

I think there's a place for one-shot stubs generators, regardless of
their level of IDE integration.

Tom





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