From Gtk2::GladeXML to Gtk2::Builder



To replace my use of Gtk2::GladeXML with Gtk2::Builder, I tried the following steps:
With Glade 3.6.4, I saved my glade xml files as Gtkbuilder files.

In my perl scripts, I changed

# $self->{glade_xml_coll} = Gtk2::GladeXML->new("glade/jrn_coll.glade", 'jrn_coll'); 
$self->{glade_xml_coll}= Gtk2::Builder->new();
$self->{glade_xml_coll}->add_from_file("glade/jrn_coll.glade.bld");

# $self->{glade_xml_coll}->signal_autoconnect_from_package($self);
$self->{glade_xml_coll}->connect_signals($self);

And all the call with get_wiget(name) were changed to get_object(name);

I got the following warning when I call the add_from_file from the builder object
Gtk-WARNING **: No object called:  at forms/jrn_coll.pm line 22.

Can someone explain me what this warning mean ?
Thanks

François 




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