After some experiments and Text.pm reading I found out
a way to do this
Seems like "good" way of doing this is unimplemented (so question is still remains, whether exists this "good" way),
but
there is "not such bad" way.
In my widget, which is derived from Tk::Text, I redefined
a function SetCursor, and all worked!
sub SetCursor {
my $w = shift;
print STDERR "here we know that cursor position changed\n";
my $rc = $w->SUPER::SetCursor(@_);
print STDERR "do something more when Text widget calmed down after c
+hanging cursor position\n";
return $rc;
}
Works okay, any cursor changes are reported.
Blessed OOP in Tk!
Also, many other intresting event mappings could be done this way.
Courage, the Cowardly Dog.
PS. Something fishy is going on there, or my name is Vadim Konovalov. And it's not. |