Re: get_name returns name of the widget not the instance



Hello.

This happens because GtkBuilder doesn't set "name" property of the
widget to "id" property in glade file anymore (I think GTK+-2.20
introduced this change).

Your code probably needs to be updated from this (it's been a while
since I coded for the last time, so take my advice with a grain of
salt):

$name = $object->get_name ();

to

$name = $object->Gtk2::Buildable::get_name ();


Or, you can set "name" property of the widget to it's "id" in Glade.

Cheers,
Tadej

-- 
Tadej BorovÅak
tadeboro.blogspot.com
tadeboro gmail com
tadej borovsak gmail com




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