-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
(This was first reported here: StrawberryPerl/Perl-Dist-Strawberry#283 )
I built Tk with Strawberry 5.038.2 from XXX-appveyor-nocache (master won't build on 5.038 and later). While all tests pass and it installs fine, I see a bug with event handling:
The following code:
use strict;
use warnings;
use Tk;
my $m = MainWindow->new();
$m->bind('all','<Enter>',\&cb_enter);
print "MainWindow is: [ $m ]\n\n";
$m->update;
$m->eventGenerate('<Motion>',qw/-x 10 -y 10 -warp 1/);
MainLoop();
sub cb_enter{
for (qw/W W x y /){
print "found '$_' Info: [ ".$_[0]->XEvent->Info($_)." ]\n";
}
my $w = $_[0]->XEvent->Info('W') ;
$w->configure(-bg=>'red');
}
produces:
MainWindow is: [ MainWindow=HASH(0x231c1305a10) ]
found 'W' Info: [ Window=SCALAR(0x231c1767908) ]
found 'W' Info: [ Window=SCALAR(0x231c1767818) ]
found 'x' Info: [ 10 ]
found 'y' Info: [ 10 ]
Tk::Error: Can't locate object method "configure" via package "Window" at test-tk.pl line 18.
<Enter>
(command bound to event)
Running this code with a Tk built under strawberry 5.032.001 I get : (as expected)
MainWindow is: [ MainWindow=HASH(0x2aeb868) ]
found 'W' Info: [ MainWindow=HASH(0x2aeb868) ]
found 'W' Info: [ MainWindow=HASH(0x2aeb868) ]
found 'x' Info: [ 10 ]
found 'y' Info: [ 10 ]
perl -V output of the strawberryperl versions used:
perlversion.txt
Metadata
Metadata
Assignees
Labels
No labels