more useful options | |
PerlMonks |
TK subroutine statusby K_M_McMahon (Hermit) |
on Feb 16, 2005 at 11:58 UTC ( [id://431533]=perlquestion: print w/replies, xml ) | Need Help?? |
K_M_McMahon has asked for the wisdom of the Perl Monks concerning the following question:
Hello fellow monks, I love TK. The ease with which a gui can be built with Perl and TK is incredible.... but I digress from my problem. I know there must be a simple solution, but as usual I am probably just overlooking the forest for the trees. Several of the scripts that I have created for use at work have to parse through many files and/or transfer files to and from remote workstations. This can take from 1 minute to 30 minutes depending on the script. The precise problem that I am having is that I want the subruotine to be able to update the mainwindow (or toplevel window as appropriate) as to what it is doing. I have tried putting a label into the main window and having the subroutine configure->Label("This is what I am doing now"); but until the subroutine completes, none of these updates are actually executed by the window. Example: I know this code example could be made much cleaner, I just threw this together to illustrate my problem, the actual scripts I am speaking of are much larger. In the above example, the Got $file does not get put into the MainWindow until the last file in @pics is processed. How do I get the Perl/TK to execute the configure command immediately instead of waiting for the subroutine to complete? Or is there a better method altogether? Thanks in advance for all your help. -Kevin
Back to
Seekers of Perl Wisdom
|
|