Code generation in Glade3(was Re: [Glade-devel] libglade usage)



On Mon, 2004-01-12 at 10:16, bighead users sourceforge net wrote:

For source generation I program driven by a simple to meduim complexity XSL
stylesheet should be good enough to generate output. I don't know the full
details on this method, but I know it can be done. If this works we could just
have xslt stylesheets for various languages with the small program in one
module (called something like glade2x or something :-) )

I use XSLT for my gobject code generator GObjectFactory.  It is a kind
of verbose way to do translation and indentation isn't clean since
whitespace is hard to mix with XML.  I guess the best way to write a
generator is to not care about indentation and run indent on it after
the fact.  Other than that XSLT should be a very straight forward way of
traslating Glade files to another language.

Conclusion:
Glade3 will not have source code generation builtin. Those who want that must
start the process of reviving old code generation projects for their
favourite languages (C, C++, Perl, Ruby, Java, Python).

Plus IDE's can work with glade files much better than trying to build a
GUI builder around any number of coding languages.  Borland's IDE's used
to do this but if you happened to put GUI code outside of the method
they were using to construct the gui in with the visual builder you were
screwed.  Not to mention it took a long time to switch between the code
and the GUI builder.

--
J5





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