in reply to Tkx combobox error on quit
#!/usr/bin/perl -w use strict; use Tk qw/tkinit DoOneEvent exit DONT_WAIT ALL_EVENTS/; use Tk::JComboBox; my $mw = MainWindow->new(); my $combo = $mw->JComboBox( -choices => [ { -name => 'Black', -value => 1 }, { -name => 'Blue', -value => 2 }, { -name => 'Green', -value => 3 }, { -name => 'Purple', -value => 4 }, 'Red', { -name => 'Yellow', -value => 5 } ] )->pack; my $count = 0; my $timer = $mw->repeat(1000,sub{ $count++; }); while ( Tk::Exists($mw) ) { $mw->DoOneEvent( DONT_WAIT | ALL_EVENTS ); print "$count\n"; if( $count > 10 ){ $mw->destroy } } print "end of gui, press a key to continue\n"; <>; print "exiting\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Tkx combobox error on quit
by Anonymous Monk on Sep 22, 2008 at 20:07 UTC | |
by zentara (Cardinal) on Sep 22, 2008 at 20:59 UTC | |
by vkon (Curate) on Sep 23, 2008 at 14:56 UTC | |
by zentara (Cardinal) on Sep 23, 2008 at 15:02 UTC | |
by vkon (Curate) on Sep 23, 2008 at 16:01 UTC | |
|