sush has asked for the wisdom of the Perl Monks concerning the following question:
sub new { my( $self, $parent, $id, $title, $pos, $size, $style, $name ) = @_ +; $parent = undef unless defined $parent; $id = -1 unless defined $id; $title = "" unless defined $title; $pos = wxDefaultPosition unless defined $pos; $size = wxDefaultSize unless defined $size; $name = "" unless defined $name; $style = wxDEFAULT_FRAME_STYLE unless defined $style; $self = $self->SUPER::new( $parent, $id, $title, $pos, $size, $sty +le, $name ); $self->{notebook_1} = Wx::Notebook->new($self, -1, wxDefaultPositi +on, wxDefaultSize, 0); $self->{inc_pane} = Wx::Panel->new($self->{notebook_1}, -1, wxDefa +ultPosition, wxDefaultSize, ); $self->{avail_but} = Wx::Button->new($self->{inc_pane}, $avail_but +, "Availability"); .... EVT_BUTTON ($self, $avail_but, sub { <b>$self->{avail_but}->SUPER::Disable(); </b> } } package main; unless(caller){ local *Wx::App::OnInit = sub{1}; my $app = Wx::App->new(); Wx::InitAllImageHandlers(); my $frame_1 = MyFrame->new(); $app->SetTopWindow($frame_1); $frame_1->Show(1); $app->MainLoop(); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (wx)?Perl - Calling methods of parent class, checking variables in child process after fork
by Joost (Canon) on Nov 22, 2007 at 23:46 UTC | |
|
Re: (wx)?Perl - Calling methods of parent class, checking variables in child process after fork
by ikegami (Patriarch) on Nov 23, 2007 at 02:50 UTC |