I have a Perl/Tk application that is basicallly a gui for displaying an image that is generated by another program. I've set up a socket and I'm using fileevent to read RGB data and put it into a Tk::Photo object.
What I would like to have happen:
User asks for an image.
Window with progress bar pops up.
When the image is completely built, progress bar disappears
and the image is displayed on the main GUI's Tk::Canvas.
My problem appears to be that the program is so busy collecting data off the socket that it doesn't update the gui until later. I've tried putting a progress bar in the canvas, using a second MainWindow for the progress bar, and multiple other configurations. They all have the same problem. If I put a window->update call into the loop that handles the socket messages, I get multiple warnings about deep recursion, and the program slows waaaaay down.
Sorry to be so vague. Can anyone help?