Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

wxPerl: is AddMany implemented?

by HelenCr (Monk)
on Apr 19, 2013 at 07:03 UTC ( #1029465=perlquestion: print w/ replies, xml ) Need Help??
HelenCr has asked for the wisdom of the Perl Monks concerning the following question:

Dear esteemed Perlmonks

Using wxPerl, it is often cumbersome (and repetitive), to have many widgets added to a sizer, each one in its own line.

I have noticed on the Net, the existence of a "convenience method" called: "AddMany" (for example here: http://neveredit.sourceforge.net/apidocs/private/wx._core.Sizer-class.html#AddMany):

AddMany is a convenience method for adding several items to a sizer at one time.

Is there a wxPerl implementation of this package? When I try to use it, I get:

Can't locate object method "AddMany" via package "Wx::BoxSizer" ... etc...

Many TIA - Helen

Comment on wxPerl: is AddMany implemented?
Select or Download Code
Re: wxPerl: is AddMany implemented? (check and see with wxperl_usage)
by Anonymous Monk on Apr 19, 2013 at 08:21 UTC
      :) make it work with wxperl-usage :)
      sub Wx::Sizer::AddMany { my ( $self, $flags, @many ) = @_; $self and $flags or Carp::croak "Usage: Wx::Sizer::AddMany( THIS, +optionalArrayrefOfOptions, window, ... )"; if ( 'ARRAY' eq ref $flags ) { @many or Carp::croak "Usage: Wx::Sizer::AddMany( THIS, optiona +lArrayrefOfOptions, window, ... )"; $self->Add( $_, @$flags ) for @many; } else { $self->Add($_) for $flags, @many; } }
        Thanks, AM's, I'll try that.
        Helen

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2014-07-12 17:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (240 votes), past polls