The problem is that your $text2 widget is actually a Scrolled('TextUndo'), but you're trying to find the Text subwidget. You need to ask for the TextUndo subwidget, like so:
#!/usr/bin/perl use warnings; use strict; use Tk; use Tk::TextUndo; my $mw = MainWindow->new(); my $text = $mw->Scrolled('TextUndo')->pack; tie *STDOUT, ref($text->Subwidget('textundo')), $text; print "Hello, world.\n"; MainLoop;
bbfu
Black flowers blossom
Fearless on my breath
In reply to Re: object method "TIEHANDLE"
by bbfu
in thread object method "TIEHANDLE"
by eoin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |