S
Stefan H.
the following code works properly, printing on Text all I print to
STDOUT
my $text = $mw->Text->pack();
tie *STDOUT, ref $text, $text;
print "prova";
but I want scrollbars, so I change to
my $text = $mw->Scrolled("Text")->pack();
at running time Perl output the following error. What's wrong??
Tk::Error: Failed to AUTOLOAD 'Tk::Frame::TIEHANDLE' at C:\Documents and
Setting
s\manfry\Desktop\perl\prova.pl line 163
Tk callback for .frame
Tk callback for .frame.ysbslice
Tk callback for .frame.ysbslice.corner
Carp::croak at C:/perl/lib/Carp.pm line 269
Tk::Widget::__ANON__ at C:/perl/site/lib/Tk/Widget.pm line 347
main::stampa_struttura at C:\Documents and
Settings\temp\Desktop\perl\prova.pl line 163
Tk callback for .button1
Tk::__ANON__ at C:/perl/site/lib/Tk.pm line 252
Tk::Button::butUp at C:/perl/site/lib/Tk/Button.pm line 111
<ButtonRelease-1>
(command bound to event)
STDOUT
my $text = $mw->Text->pack();
tie *STDOUT, ref $text, $text;
print "prova";
but I want scrollbars, so I change to
my $text = $mw->Scrolled("Text")->pack();
at running time Perl output the following error. What's wrong??
Tk::Error: Failed to AUTOLOAD 'Tk::Frame::TIEHANDLE' at C:\Documents and
Setting
s\manfry\Desktop\perl\prova.pl line 163
Tk callback for .frame
Tk callback for .frame.ysbslice
Tk callback for .frame.ysbslice.corner
Carp::croak at C:/perl/lib/Carp.pm line 269
Tk::Widget::__ANON__ at C:/perl/site/lib/Tk/Widget.pm line 347
main::stampa_struttura at C:\Documents and
Settings\temp\Desktop\perl\prova.pl line 163
Tk callback for .button1
Tk::__ANON__ at C:/perl/site/lib/Tk.pm line 252
Tk::Button::butUp at C:/perl/site/lib/Tk/Button.pm line 111
<ButtonRelease-1>
(command bound to event)