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
In reply to Re: Tk::Stderr flush
by Athanasius
in thread Tk::Stderr flush
by honyok
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |