in reply to Tk::Stderr flush
Add a delete line to the sub PRINT in Tk::Stderr::Handle:
sub PRINT { my $window = shift; my $text = $$window->Subwidget('text'); $text->delete('0.0', 'end'); # <= Add this line $text->insert('end', $_) foreach (@_); $text->see('end'); $$window->deiconify; $$window->raise; $$window->focus; $$window->update; # ** hacked this line ** - + honyok }
With this line added, each new press of a button writes a message replacing the previous message in the popup window.
Hope that helps,
Athanasius <°(((>< contra mundum
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Tk::Stderr flush
by honyok (Sexton) on Sep 15, 2012 at 22:07 UTC | |
by Anonymous Monk on Sep 15, 2012 at 23:24 UTC | |
by honyok (Sexton) on Sep 17, 2012 at 19:16 UTC | |
by Anonymous Monk on Sep 17, 2012 at 19:35 UTC | |
by honyok (Sexton) on Sep 17, 2012 at 20:19 UTC |