J
joe.cipale
I am attempting to build a Tk:Optionmenu pull down from a string that
is passed to a sub-routine from one of my menu items. The string may
look like this:
2 3 8 10 14
The string WILL change, which is why I want to pass the string to my
menu pulldown as such:
my @slt_opt = qw/\$slt/;
$frame3->Label(-text => "Slot ID: ")->pack(-side => 'left',
-anchor => 's',
-expand => 1);
$frame3->Optionmenu(-variable => \$slots,
-options => [@slt_opt],
-command => [sub {print "args=@_\n"}, 'First']);
======================================
Am I reaching with what qw can do here?
Regards,
Joe
is passed to a sub-routine from one of my menu items. The string may
look like this:
2 3 8 10 14
The string WILL change, which is why I want to pass the string to my
menu pulldown as such:
my @slt_opt = qw/\$slt/;
$frame3->Label(-text => "Slot ID: ")->pack(-side => 'left',
-anchor => 's',
-expand => 1);
$frame3->Optionmenu(-variable => \$slots,
-options => [@slt_opt],
-command => [sub {print "args=@_\n"}, 'First']);
======================================
Am I reaching with what qw can do here?
Regards,
Joe