This will call ok($win) whenever the OK button is triggered (In general, \&ok is clearer than sub { ok() }). ok() then becomes:$win->Button(-text => 'OK', -command => [\&ok, $win])->pack;
sub ok { my $win = shift; $win->destroy; $notified = 1; }
In reply to Re: Tk question
by batkins
in thread Tk question
by monktim
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |