Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Entry from cascade menu

by Anonymous Monk
on May 25, 2010 at 15:33 UTC ( [id://841593]=perlquestion: print w/replies, xml ) Need Help??

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

Thanks
Michael

Replies are listed 'Best First'.
Re: Entry from cascade menu
by eric256 (Parson) on May 25, 2010 at 15:47 UTC

    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.


    ___________
    Eric Hodges

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://841593]
Approved by tinita
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-23 18:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found