Hi,

On Wed, Apr 11, 2001 at 05:48:22PM -0400, Damon Chaplin wrote:
> > It's working fine, but we need to remove the embeded Perl code from the
> > XML files before editing with the Glade builder and then put it back
> > afterwards.
> > 
> > This is a complicated step and solving it externally (using diff/patch, etc)
> > is hard. A better solution would be for Glade to support XML comments, where

> I can see that it would be useful to be able to bundle together the
> interface
> description and the code into one file for scripted languages like
> Perl/Python.
[...]
> Can't you do it that way instead? i.e. you generate the XML interface
> description
> as well as the Perl/Python script to load it using the libglade
> bindings, and the
> code for the signal handlers.

Well, yes, we already do that. We have a perl script and modules fetching the
XML from Mason, doing a GladeXML new_from_memory call and auto_connect'ing the
signals to a Perl autoloader that calls ups the appropriade handlers from existing
Perl modules.

That's done, it works just fine. Now, what we want to to is generate Glade widgets
at run-time, dynamically, be composing the apropriate XML code for those widgets
in Mason, just as if the interface was an HTML page. 

This works too, wonderfully, however it would be better if we could embbed the Perl 
code 
necessary for the XML generation inside the Glade project itself, in tags unparsed, 
kept 
untouched by the Glade editor. There are no such tags however, that I could find.

My suggestion would be to support XML comments in the form <!-- -->, ignore them, but 
keep
them on the project tree for saving into the new XML.

I will spend a couple of hours around this now, I will post again if I can make out
somehting of it.

Thanks,

Gabriel

_______________________________________________
Glade-devel maillist  -  [EMAIL PROTECTED]
http://lists.helixcode.com/mailman/listinfo/glade-devel

Reply via email to