Now, when you're in the for loop (which is probably buried inside such a callback), Tk has no way to update the text box until you return from the callback and give control back to it. I'm no expert in Perl/Tk, but you can look for some "interim-update" functions that give control back to Tk temporarily, just to perform this kind of screen updates.
Does it make sense to you?
Update: perusing zentara's answer I noticed that I overlooked the fact that you're using sleeps, which you generally shouldn't for the reasons excellently explained above. OTOH, I hope you were using those sleeps just to explain your point clearly; if those sleeps actually mean "some heavy computation" try anyway to see if there's some interim-update function that you can put inside the computation inself, just to give some feedback ASAP.
Flavio (perl -e 'print(scalar(reverse("\nti.xittelop\@oivalf")))')
Don't fool yourself.In reply to Re: Tk::Text and buffering, I think
by polettix
in thread Tk::Text and buffering, I think
by rvosa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |