Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Padre User Interaction in plugin

by bobuillean (Novice)
on Jan 22, 2010 at 17:29 UTC ( #819014=perlquestion: print w/replies, xml ) Need Help??

bobuillean has asked for the wisdom of the Perl Monks concerning the following question:

Folks,

I have a Padre plugin under construction that needs to get some user input. Is it as easy as:
use Wx::Perl::Dialog::Simple; my $response = entry( 'title' => "What's yer poison");

?

If so why wouldn't this work?

sub menu_plugins_simple { my ($self) = @_; return $self->plugin_name() => [ 'Add' => sub { my $name = entry(title => "Cad an sceal?"); }, ]; }

The menu comes up OK in the Plugins menu but the 'Add' option does nothing.

Thanks in advance for any tips.

Replies are listed 'Best First'.
Re: Padre User Interaction in plugin
by Corion (Pope) on Jan 22, 2010 at 17:32 UTC

    How does it fail for you?

      Wow - quick response! Thanks.

      Literally does nothing. I select the 'Add' option & nothing happens.

      But I have figured something out - I have to qualify 'entry' with the package name (i.e. qw (entry) doesn't work). Works as expected after that.

      Could be because I haven't restarted my laptop since I installed Padre this morning.

      I'll check this out later.

      It's nice to be back inside the gates - I haven't looked in for a good while. I'm sure I'll have some more idiot moments before too long.

      Thanks again

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2019-06-16 00:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Is there a future for codeless software?



    Results (76 votes). Check out past polls.

    Notices?