sannu has asked for the wisdom of the Perl Monks concerning the following question:
I don't know if this is even a legal call. But this does not seem to work even if I do not pass $button2. Can you please suggest a way out of this? Thanks a lot for your help.{##### block of code ##### my $button2 = $frame2->Button(-text => "Label", -command => \&subroutine2($label2, $frame2, $button1, $button2))->pack +(); ##### block of code ends here ##### } sub subroutine2{ foreach @_{ packForget $_; } ##### rest of subroutine ##### }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: passing a button in its own -command option
by pg (Canon) on Oct 07, 2003 at 04:16 UTC | |
by sannu (Initiate) on Oct 07, 2003 at 08:56 UTC |