Great! I mentioned the DoOneEvent method, because in your code, it seemed that you needed to do a while(1){}, or run a second event loop. When you try to run 2 (or more) event-loop based programs, only 1 event loop can be in control, and you need to manually "pump" the othe loop(s) with DoOneEvent (or whatever their system calls it).In Tk the MainLoop is
sub MainLoop
unless ($inMainLoop) {
local $inMainLoop = 1;
while (Tk::MainWindow->Count) {
DoOneEvent(0);
}
}
}
So if you can't use Tk::MainLoop in your program to be the controlling event loop, you can place the DoOneEvent in a timer, or a while(1) loop and effectively keep Tk active and responding.But it sounds like you are on your way with threads, and that is your best option.
I'm not really a human, but I play one on earth.
flash japh
| [reply] [d/l] |