in reply to POE, Tk, Simultaneous problem!
Test case code (below) generates the errors shown. Looks like POE doesn't do Tk.
* * POE can't use multiple event loops at once. * You used Select and Tk. * BEGIN failed--compilation aborted at C:/Perl/site/lib/POE/Kernel.pm li +ne 491. Compilation failed in require at (eval 14)[C:/Perl/site/lib/POE.pm:40] + line 1. BEGIN failed--compilation aborted at (eval 14)[C:/Perl/site/lib/POE.pm +:40] line 1. could not import qw(Kernel) at noname.pl line 4 BEGIN failed--compilation aborted at noname.pl line 4.
use warnings; use strict; use Tk; use POE; my $killAll = 0; POE::Session->create (inline_states => {_start => \&startApplication, searchmode => \&sea +rchMode}); POE::Session->create (inline_states => {_start => \&searchUpdate}); POE::Kernel->run(); # Relevant is also: sub startApplication { my $main = MainWindow->new; $main->Toplevel(-title => "Search"); MainLoop; $killAll = 1; } sub searchUpdate { while (! $killAll) { sleep 1; print '.'; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: POE, Tk, Simultaneous problem!
by Ace128 (Hermit) on Sep 28, 2005 at 06:03 UTC | |
by GrandFather (Saint) on Sep 28, 2005 at 06:09 UTC | |
by Ace128 (Hermit) on Sep 28, 2005 at 11:52 UTC |