From: DH <cra...@ya...> - 2003-08-29 13:35:59
|
When you run it, there are two radio buttons "Remember last directory used" which is checked (and start of a group), followed by "use default save directory". If I click on any of the radio buttons, the app slows to a crawl. I've no clue how/why that happens. The code is generated using the latest wxGlade cvs. Is it wxWindows bug? wxPerl bug? wxGlade bug? what goes wrong? My build running on wxPerl 0.16 wxWindows 2.4.1 no unicode no static no debug Win2000SP2 Here's a simple one that works fine (it don't freeze up, and the radio buttons get clicked) #!/usr/bin/perl -w -- # generated by wxGlade 0.3pre2 on Fri Aug 29 06:18:37 2003 # To get wxPerl visit http://wxPerl.sourceforge.net/ use Wx 0.15 qw[:allclasses]; use strict; package MyFrame; use Wx qw[:everything]; use base qw(Wx::Frame); use strict; use Wx::Locale gettext => '_T'; 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; # begin wxGlade: MyFrame::new $style = wxDEFAULT_FRAME_STYLE unless defined $style; $self = $self->SUPER::new( $parent, $id, $title, $pos, $size, $style, $name ); $self->{radio_btn_1} = Wx::RadioButton->new($self, -1, _T("radio_btn_1"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP); $self->{radio_btn_3} = Wx::RadioButton->new($self, -1, _T("radio_btn_3"), wxDefaultPosition, wxDefaultSize, ); $self->{radio_btn_2} = Wx::RadioButton->new($self, -1, _T("radio_btn_2"), wxDefaultPosition, wxDefaultSize, ); $self->__set_properties(); $self->__do_layout(); return $self; # end wxGlade } sub __set_properties { my $self = shift; # begin wxGlade: MyFrame::__set_properties $self->SetTitle(_T("frame_1")); $self->{radio_btn_1}->SetValue(1); # end wxGlade } sub __do_layout { my $self = shift; # begin wxGlade: MyFrame::__do_layout $self->{sizer_1} = Wx::BoxSizer->new(wxVERTICAL); $self->{sizer_2} = Wx::BoxSizer->new(wxHORIZONTAL); $self->{sizer_2}->Add($self->{radio_btn_1}, 0, 0, 0); $self->{sizer_2}->Add($self->{radio_btn_3}, 0, 0, 0); $self->{sizer_2}->Add($self->{radio_btn_2}, 0, 0, 0); $self->{sizer_1}->Add($self->{sizer_2}, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 10); $self->SetAutoLayout(1); $self->SetSizer($self->{sizer_1}); $self->{sizer_1}->Fit($self); $self->{sizer_1}->SetSizeHints($self); $self->Layout(); # end wxGlade } # end of class MyFrame 1; package MyApp; use base qw(Wx::App); use strict; sub OnInit { my( $self ) = shift; Wx::InitAllImageHandlers(); my $frame_1 = MyFrame->new(); $self->SetTopWindow($frame_1); $frame_1->Show(1); return 1; } # end of class MyApp package main; unless(caller){ my $local = Wx::Locale->new("English", "en", "en"); # replace with ?? $local->AddCatalog("app"); # replace with the appropriate catalog name my $app = MyApp->new(); $app->MainLoop(); } __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com |