Subject: | Tk Fails in Fedora 10 |
A Scrolled window in perk Tk fails under Fedora10 but not under Ubuntu
8.10. (KDE issue??):
no event type or button # or keysym at
/usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi/Tk/Widget.pm
line 1105.
The following code duplicates the error:
------------------------
use strict ;
use Tk ;
my($mw) = new Tk::MainWindow() ;
my($text) = $mw->Scrolled('Text')->pack() ;
MainLoop() ;
---------------------------
Commenting out the 'bind' call(Widget.pm 1104-1105) below and the window
can open as expected
sub MouseWheelBind
{
my($mw,$class) = @_;
# The MouseWheel will typically only fire on Windows. However, one
# could use the "event generate" command to produce MouseWheel
# events on other platforms.
$mw->Tk::bind($class, '<MouseWheel>',
[ sub { $_[0]->yview('scroll',-($_[1]/120)*3,'units') },
Tk::Ev("D")]);