For Programmers: Free Programming Magazines  


Home > Archive > PerlTk > March 2007 > POE & Tk -Loop Error - Please help.









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 -Loop Error - Please help.
JeffHallock

2007-03-12, 2:29 pm

I'm running ActivePerl 5.8.8.820 on Windows XP SP2. POE v1.177 downloaded us
ing 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] l
ine 1.
BEGIN failed--compilation aborted at (eval 17)[C:/Perl/site/lib/POE.pm:4
0] 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 1
4.

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 -fi
ll 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 to use Select?
Sponsored Links







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

Copyright 2008 codecomments.com