Re: gtk2-perl tree signals



Jens Wilke <jens wilke org> writes:

Hi,

i've got some trouble with the tree_simple.pl example.
I tried to add a signal event, but this doesn't work:

foreach (@children) {
    $tree_model->append($iter, $parents_iterators{$_->{parent}});
    $tree_model->set($iter, [ 0 => $_->{value} ]);
    $iter->signal_connect('select', sub { print "item selected\n" });

the TreeIter doesn't have such signal. doesn't it tell you so on
the console?

you have to connect to $tree_model->get_selection

find some example in misc-examples/treeview.pl

-- 
Guillaume Cottenceau - http://people.mandrakesoft.com/~gc/



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