in reply to More Tk Help
You are capturing the initial values of $output and $report_type, not the values as they will be later, after you have toggled the radio buttons.$exit_frame->Button(-text => "Track", -command => [ \&track_changes, ($listbox, $output, $report_typ +e) ])->pack;
A simple fix would be to hold onto references instead, like this:
Then in your track_changes subroutine, do:$exit_frame->Button(-text => "Track", -command => [ \&track_changes, ($listbox, \$output, \$report_t +ype) ])->pack;
sub track_changes { my ($listbox, $output_ref, $report_type_ref) = @_; my @files = $listbox->curselection; for (@files) { my $file = $listbox->get($_); print "$file\n"; } print "$$output_ref\n"; print "$$report_type_ref\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: More Tk Help
by jdporter (Paladin) on Jan 11, 2005 at 14:19 UTC |