Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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

by Rich36 (Chaplain)
on Nov 21, 2002 at 21:05 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://214926]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-24 00:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found