For Programmers: Free Programming Magazines  


Home > Archive > PERL POE > February 2007 > POE & Tk error - Cant use multiple event loops









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author POE & Tk error - Cant use multiple event loops
JeffHallock

2007-02-19, 2:23 pm

I'm running ActivePerl 5.8.8.820 on Windows XP SP2. POE v1.177 downloaded using PPM and Tk 804.027 packaged with ActivePerl.

I consistently receive the message:


*
* 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 line 491.
Compilation failed in require at (eval 17)[C:/Perl/site/lib/POE.pm:40] line 1.
BEGIN failed--compilation aborted at (eval 17)[C:/Perl/site/lib/POE.pm:40] line 1.
could not import qw(Kernel) at C:\Projects\pBotty\pBotty.pl line 14
BEGIN failed--compilation aborted at C:\Projects\pBotty\pBotty.pl line 14.

Here is the code that produced the error:

code:
use warnings; use strict; use Tk; use POE; POE::Session->create ( inline_states => { _start => \&_start, } ); sub _start{ my ( $kernel, $session, $heap ) = @_[ KERNEL, SESSION, HEAP ]; $poe_main_window->Frame(-background => '#000000')->pack(qw/-expand 1 -fill both/); undef; } # Run the program until it is exited. $poe_kernel->run(); exit 0;


I have also tried these to no avail:
code:
use POE qw(Loop::Tk); -- and -- use POE qw(Loop::TkActiveState);


I have also tried installing POE and Tk from CPAN and still recieve the same error.

I'm assuming there must be a way to force POE not use Select?
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com