in reply to Server with GUI

I don't use Wx, but you cannot run network connection code, within your GUI setup code blocks. You have the network connection code, right within the package Demo::App::Frame. So it must do it thing, before the GUI shows.

As a first start at a solution, take the network connection code out of that package, put it in a subroutine, and make a "Connect" button to launch it. That way, your GUI will come up first, then you press the Connect button. Also be warned that you will probably need to put your network handling code in a separate thread, so the network action won't interfere with the Wx event loop.

After you get it working that way, you probably can use a Wx method to test for "visibility", before lauching your network sub with a timer.


I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

Replies are listed 'Best First'.
Re^2: Server with GUI
by gg4000 (Novice) on May 28, 2012 at 15:50 UTC
    you cannot run network connection code, within your GUI setup code blocks. You have the network connection code, right within the package Demo::App::Frame. So it must do it thing, before the GUI shows.

    I tried moving it to the top. I still can't get them both to happen.