Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi Dear Monks
I'm writing a menubar (using cascade/command)
This woek great, but now I want to make a slight change, instead of carry out the command I want the user to be able to enter parameters to the commands before excuting them (not all the commands)
Now- here's the problem- I can't call Entry/Frame->Entry through cascade (damm!).
This is the (none working) code, I have in mind:
$m = $$sub_mb_gen->cascade(-label => $sub_menu, -tearoff => 0);
foreach my $command_type (sort keys %{$cmd}){
if(!$params){
$m->command(
-label => $command_type,
-command => sub {do somethin}
);
}
else{
foreach my $param (key %{$params}){
$m->some kind of Entry
}
What do you think, I'm not sure it's possible at this configuration
It sounds like what you want is to have a menu item open up a dialog box of some sort that takes the parameters first, then have that dialog box do the work when the user presses okay.