doojinsi has asked for the wisdom of the Perl Monks concerning the following question:
Nothing displays in the widget until the end of dosomething. How can I update it dynamically? I've tried using 'see', 'fileevent' and 'focus' on $tw and have $|++'ed liberally but still get no output until the loop completes :-( doojpseudo-snippet -- use Tk; $mw = MainWindow->new; $tw = $mw->Scrolled ("Text"); $bu = $mw->Button(-text=>"Go", -command=>\&dosomething); Mainloop; exit; sub dosomething { for my $i (1 .. 500) { $tw->insert('end',"\$i is " . $i); }; } __END__
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tk Scrolled widget hairpuller
by zentara (Cardinal) on Apr 22, 2005 at 22:05 UTC | |
by doojinsi (Novice) on Apr 26, 2005 at 13:46 UTC |