in reply to Problem with wxPerl

$self is not the object you think it is, MyDialog->new and MyFrame->new create two different objects

Replies are listed 'Best First'.
Re^2: Problem with wxPerl
by Swalif (Scribe) on Aug 27, 2010 at 01:47 UTC
    Thank you , How should I refer to the object correctly?
      Heres how I would do it with wxTextEntryDialog
      sub add_alert { my ($self, $event) = @_; #~ my $md = MyDialog->new(my $frame_1); #~ $md->ShowModal(); my $dialog = Wx::TextEntryDialog->new( $self, "Enter some text", "Wx::TextEntryDialog sample", 9, # "I am a default value" ); if ( $dialog->ShowModal == Wx::wxID_OK() ) { unshift @numbers, $dialog->GetValue; $self->{text_ctrl_1}->SetLabel("The button @numbers"); } $dialog->Destroy; }
        Thank you sir exactly what I wanted.. AND I will read the article..
      What do you think?