Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Is there a Perl Tk "console" widget?

by Rich36 (Chaplain)
on Nov 21, 2002 at 21:05 UTC ( #214926=note: print w/replies, xml ) Need Help??


in reply to Is there a Perl Tk "console" widget?

There's a simpler way in Tk to do the tie. You specify the filehandle, the widget type and the variable representing the widget. Also, this might be something else worth looking into.

# Tie STDOUT to the ROText box so that the messages to STDOUT appear t +here tie (*STDOUT, 'Tk::ROText', $widget);

«Rich36»

Replies are listed 'Best First'.
Re: Re: Is there a Perl Tk "console" widget?
by John M. Dlugosz (Monsignor) on Nov 22, 2002 at 15:40 UTC
    Hmm, that works...eventually. It doesn't have the equivilent of my $$$this->update on each call to WRITE, so no output shows up until the whole thing is done.

    The tie ability is not mentioned in the Tk::Text or Tk::ROText docs. Where is that discussed? Maybe there's information there about configuring it, too.

    —John Update: I found the PRINT method in Tk::Text.pm and added a call $w->update;. That did the trick. There is no configuration ability in that code.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://214926]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2021-04-14 19:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?