Re: storing Perl-Gtk objects on disk



As Count Zero points out you can't simply dump a Perl/Gtk object
with Data::Dumper. You need to do your own serialization
(an option is to output Perl code that will reconstruct the
widgets). It's not easy to generalize it with the current Gtk+
library because you don't have access to all of the objects
internals. Gtk+ 2.0 is supposed to make this stuff easier, but
you'll still need to take care of many issues yourself, like
signal handlers and the like.
Using glade/libglade is a sensible suggestion and it will be even 
more sensible when I reach this item in my TODO list:

* Develop a Gtk+ module that can be loaded in an application
  and will dump on request a .glade file with the interface 
  description.

Unfortunately it's scheduled sometime in 2002 ... ;-)

lupus

-- 
Paolo Molaro, Open Source Developer, Linuxcare, Inc.
+39.049.8043411 tel, +39.049.8043412 fax
lupus linuxcare com, http://www.linuxcare.com/
Linuxcare. Support for the revolution.




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