http://www.perlmonks.org?node_id=471444

injunjoel has asked for the wisdom of the Perl Monks concerning the following question:

Greetings all,
I have been working with Tk recently and I love how easy it makes GUI development. However I have run into a bit of a problem and Im hoping it is something fairly simple to remedy.
Here is a brief desciption:
I have an object I created that handles the parsing of a particular type of text file from a shared directory on our network. I have wrapped this object in a Tk interface and everything is working just fine. However since I want to allow users to batch process directories of files I have to show them the current progress of what is going on so they don't think the computer is frozen.
The problem is within "&loadfiles" I am attempting to produce a log window
$logwin = $framename->Scrolled('Text', -height=>10, -width=>50, -scrol +lbars=>'e')->pack(-side=>'top', -padx=>4, -expand=>1);

that I can then insert file processing status to. However, when I click on "Load Files" the script is waiting for "&loadfiles" to finish before it returns anything and thus the log window only shows up after everything has been processed.
I would like to be able to create the log window first and insert parsing status as it goes through the array, otherwise the users might think the computer is frozen and start clicking like mad.

What have I tried?
I have tried creating the screen in a seperate sub, then from within the button command checking if the screen was created successfully. If so start loading the files. Still no dice.
Does this sort of thing require forking a child process that I get status from?
Any suggestions? I can post code if needed.
Thanks in advance.

Update!
Well I got it working. A combination of $Widget->update; and $framename->see("end"); did it.
Im still open to suggestions though if anyone sees a problem with my current solution. Thanks again.

-InjunJoel
"I do not feel obliged to believe that the same God who endowed us with sense, reason and intellect has intended us to forego their use." -Galileo