lukaszt has asked for the wisdom of the Perl Monks concerning the following question:
---------------------------------------- And when I put it in this way, first program do the while loop and than start window: -----------------------------------------sub CheckTime { $exeTime=18; $Hour=shift(@_); $loopStop=0; while ($loopStop==0) { sleep(1); # 1 = 1s ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time +); $ZWIDGETS{'Text1'} -> insert('end',"Waiting......\n"); if ($hour==$exeTime) { $loopStop=1; $ZWIDGETS{'Text1'} -> insert('end' +,"Starting.....\n");} } return $hour; }
----------------------------------------&CheckTime($HourGet); MainLoop();
I need the subroutine works all the time and update Tk Text box...
Is there sth in perl like onForm_load???
I have try use the threads but Tk and threads works really bad.
Thx for help..
20060808 Janitored by Corion: Added formatting, code tags, as per Writeup Formatting Tips
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tk and While Loop
by jdtoronto (Prior) on Aug 08, 2006 at 16:38 UTC | |
|
Re: Tk and While Loop
by liverpole (Monsignor) on Aug 08, 2006 at 18:11 UTC | |
|
Re: Tk and While Loop
by GrandFather (Saint) on Aug 08, 2006 at 21:16 UTC |