Folks-

This problem was solved off of the POE mailing list by Andrew F.

It turns out that POE::Kernel tries to figure out which event loop to use, if none is specified. It was guessing correctly from the *.pl file, but incorrectly from the *.exe file (it tried to use the default POE::Loop::Select). I don't know what perlapp does to make POE::Kernel guess incorrectly, but to solve the problem you simply force POE::Kernel to use the correct event loop. Here is Andrew's solution (also note all the "use" statements so you don't have to put all those "--add" command line options on your perlapp line):

use warnings; use strict; use Tk; use POE qw (Loop::TkActiveState); use POE::Loop::TkActiveState; use POE::Kernel; use POE::Session; use POE::Resource::Aliases; use POE::Resource::Events; use POE::Resource::Extrefs; use POE::Resource::FileHandles; use POE::Resource::Sessions; use POE::Resource::SIDs; use POE::Resource::Signals; use POE::Resource::Statistics; if(! defined($poe_main_window)) { die "\$poe_main_window not defined" +};
Thanks Andrew!

-Craig


In reply to SOLVED: POE & Tk totally confound perlapp (or am I missing something?) by cmv
in thread POE & Tk totally confound perlapp (or am I missing something?) by cmv

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.