hai comerads,

thats pretty my message.
i could not came up with an examplewhere i inherit from Boxsizer but with an
own extended class.

whats wrong with:

use strict;
use warnings;
use Kephra::API;
use Wx;

package Kephra::App::Sizer;
our @ISA = 'Wx::BoxSizer';


sub new {
        my $class = shift;
        my $orient = shift;

        if    (lc substr($orient, 0, 1) eq 'v') { $orient = &Wx::wxVERTICAL }
        elsif (lc substr($orient, 0, 1) eq 'h') { $orient = &Wx::wxHORIZONTAL }
        #elsif (not defined $orient)             { $orient = &Wx::wxHORIZONTAL }
        else {
                return Kephra::Log::error
                        ("need h|horizontal or v|vertical as first parameter, 
not $orient", 1)
        }
        my $self = $class->SUPER::new( $orient );
print $self,"-----------------------\n" if $self->isa('Wx::Sizer');
        $self->append(@_);
        $self;
}

print say its a Boxsizer not Kephra::App::Sizer
thanks for any advise

PS the books is slowly starting to pace up
best
herbert

Reply via email to