Re: From Gtk2::GladeXML to Gtk2::Builder



On Thu, Nov 17, 2011 at 7:36 AM, RAPPAZ Francois
<francois rappaz unifr ch> wrote:
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 ?

Can you post/pastebin the contents of your Glade XML file
(jrn_coll.glade.bld) and the module jrn_coll.pm?  There's not enough
context here to determine what is causing that error.

Thanks,

Brian



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