jsteng has asked for the wisdom of the Perl Monks concerning the following question:
The above codes I understand, knowing how many parameters and how to intercept the params in a subroutine.$submit->bind('<1>' => sub { Submit($p1, $p2, $p3, $p4, $p5); } );
$yscroll=$mw->Scrollbar()->pack(-fill=>'y', -side=>'right',); $yscroll->configure( -command => [ \&ScrollAll, $yscroll, [$p1, $p2, $ +p3, $p4, $p5]]); sub ScrollAll { my ($sb, $wigs, @args) = @_; foreach my $w (@$wigs) { $w->yview(@args); } }
thanks-command => sub { subname ($p1, $p2, $p3, $p4, $p5); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: TK param passing
by Discipulus (Canon) on Apr 24, 2018 at 07:11 UTC | |
|
Re: TK param passing
by Anonymous Monk on Apr 24, 2018 at 02:08 UTC |