in reply to wxPerl: is AddMany implemented?
check and see with wxperl_usage / wxperl-usage / wxPerl::Usage / Class Method Browser , available methods, method invocation syntax, link to docs
Also, you didn't notice that "convenience method" on the wxwidgets website
http://docs.wxwidgets.org/trunk/search.php?query=AddMany
Perl doesn't really need such a convenience method
$sizer->Add( $_, 1, Wx::wxEXPAND() ) for $code, $text, $tree, $snickerdoodle;
But you could make one
sub Wx::Sizer::AddMany { my $sizer = shift; $sizer->Add($_) for @_; } sub Wx::Sizer::AddMany { my ( $self, @many ) = @_; $self->Add($_) for +@many; } sub Wx::Sizer::AddMany { my ( $self, $flags, @many ) = @_; if ( 'ARRAY' eq ref $flags ) { $self->Add( $_, @$flags ) for @many +; } else { $self->Add($_) for $flags, @many; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: wxPerl: is AddMany implemented? (check and see with wxperl_usage)
by Anonymous Monk on Apr 19, 2013 at 09:00 UTC | |
by HelenCr (Monk) on Apr 21, 2013 at 14:37 UTC |