tall_man has asked for the wisdom of the Perl Monks concerning the following question:
The problem appears to be here:use strict; use Tk; sub gotClick { print "got click\n"; } my $main = new MainWindow; # This one gets wiped out. $main->bind('<ButtonRelease-1>' => sub { gotClick() }); my $combo = $main->BrowseEntry(); $combo->pack(); Tk::MainLoop();
BrowseEntry.pm:78: $b->toplevel->bind('<ButtonRelease-1>',[$w,'Bu +ttonHack']);
My temporary work-around is to do the window's event binding last, after all the controls have been created. Is there a better way to get around this problem?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tk::BrowseEntry eats click binding
by Tanalis (Curate) on Jan 22, 2003 at 08:59 UTC | |
|
Re: Tk::BrowseEntry eats click binding
by castaway (Parson) on Jan 22, 2003 at 08:55 UTC | |
by tall_man (Parson) on Jan 22, 2003 at 15:14 UTC |