I'm revisiting this program, and I wonder if now there is something in Perl Tk that does this already, or a more comprehensive module that implements this?
—John# Tie a file handle to a text widget package OutHandle; use Tie::Handle; use vars qw (@ISA); @ISA= ('Tie::Handle'); sub TIEHANDLE { my ($class, $widget)= @_; my $object= \$widget; return bless \$object, $class; #ref to scalar pointing to widget } sub WRITE { my ($this, $s, $len, $offset)= @_; $s= substr ($s, $offset, $len); if ($s eq "\x19") { #End Of Medium control code used to clear screen $$$this->delete ("1.0", 'end'); } else { $$$this->insert ('end', $s); } $$$this -> update; }
In reply to Is there a Perl Tk "console" widget? by John M. Dlugosz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |