treeview and liststore cursor-changed signals trivial problem ?
- From: Christian Hamar alias kRiX <krics linuxforum hu>
- To: gtk-perl-list gnome org
- Subject: treeview and liststore cursor-changed signals trivial problem ?
- Date: Fri, 5 Sep 2003 23:31:46 +0200
Hi there.
So. When i create a treeview and a liststore. Then i put some signals for
cursor-changed . I have a 3 words list now. Everything works perfectly. When
i select a list item then the function called for cursor-changed . Which
function do a simple print. prints out the item value. But.
It's a little bit faster then my mouse? :) so when i click to an item in the
list then i can fetch the value and print out to the console. But i see that
sometimes the value writed at twice. (the function for cursor-changed signal
called twice immediately)
Why is this ?
A sample script:
sub on_cursor_changed {
print "CALLER: cursor_changed_called\n";
my $iter = $list->get_selection->get_selected;
$selection = $model->get($iter, 0);
print "ITEM - $selection\n";
}
then i go. Click on one list item and sometimes see this:
CALLER: cursor_changed_called
ITEM - blah
CALLER: cursor_changed_called
ITEM - blah
then i click on some else list item:
CALLER: cursor_changed_called
ITEM - blah2
So sometimes for only one click the list duplicated and printed out twice
(function called twice)
No error messages.
Any idea?
Best Regards
Christian Hamar alias kRiX
Hungary
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]