Re: GTK2, XML, perl

On Sun, 2006-03-12 at 22:04 -0400, Josà Luis Regalado wrote: 
Glade generate a file called by example: It is possible to 
happen of to, it is to say, XML to perl code?

That would mean that you could not go back to Glade and revise your user
interface.  If you did, and re-generated, you would lose all the
changes you'd made.

It is better to keep your user interface and your logic separate.

A useful technique is to create a Perl class and using Glade, connect
signal handlers to method calls against an object of that class.  Such a
technique is described in this tutorial:

You might find it useful to generate the outline of this class using a
script that reads the .glade file and generates a .pm file.  However, if
you later add signal handlers to the glade definition, you'll need to
add the methods manually to the .pm file.

Marco Antonio Manzo's Gtk2::GladeXML::Simple module includes a script
called gpsketcher that can create an initial .pm file for you:


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