Re: gtk2-perl tree signals



Jens Wilke <jens wilke org> writes:

On Thursday 27 March 2003 17:25, Guillaume Cottenceau wrote:

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

That's the problem :)

you have to connect to $tree_model->get_selection

This doesn't work:
Is gtk2-perl missing Gtk2::TreeStore::get_selection ?
Call trace:
        Gtk2::_Object::AUTOLOAD() called from ./tree_simple.pl:50

When connecting to $tree and connecting

Yes sorry it was the TreeView, not the TreeModel. This model-view
splitting is not always good for guessing what is done on what.

$selection->signal_connect("changed", sub {print "selected"});
it prints "selected" to the console after quitting! It prints much more often 
than s'thing was selected.

use "\n".

yes, one signal is also sent for unselection.

BTW: are there any other signals than "changed"? "clicked" or "selected" 
doesn't work.

look at the gtk+ API documentation.

find some example in misc-examples/treeview.pl

That uses ListStore, TreeStore seems not to support get_selection.

they are quite close, that is.

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



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