Date: Tue, 09 Oct 2001 16:50:48 -0700 From: Jordan Hubbard <jkh@freebsd.org> To: anarcat@anarcat.dyndns.org Cc: freebsd-libh@freebsd.org Subject: Re: How to create a GUI console in tclh Message-ID: <20011009165048X.jkh@freebsd.org> In-Reply-To: <20011009194322.E601@shall.anarcat.dyndns.org> References: <20011009143206.A27943@shall.anarcat.dyndns.org> <20011009163733T.jkh@freebsd.org> <20011009194322.E601@shall.anarcat.dyndns.org>
next in thread | previous in thread | raw e-mail | index | archive | help
The Tcl "channel" abstraction should provide everything you need - in particular, you can stack channels on top of one another in order to implement this kind of redirection or you can close a channel, like stdout, and reassign it to something like a pipe. - Jordan > On Tue Oct 09, 2001 at 04:37:33PM -0700, Jordan Hubbard wrote: > > This should be fairly easy to do - just take a look at what tclsh does > > to implement its command parser. You basically just want to read in a > > text string, call TCL's evaluator on it, > > I'm absolutely non-worried about that. I already implemented some basic > Tk tcl shell as a primary Tk exercise. :) > > > and insert the results back into the console window. > > That is the whole problem. How can I redirect a stream to a window??? > > > > I'm sure libh has some sort of scrolling > > text widget already, right? I'm ashamed to say I haven't looked > > lately, but this should be a very straight-forward "junior libh > > hacker" sort of project. > > Yah... Well, my only concern is with streams redirection... > > > You may also want to redirect stdout > > somewhere so that things like "puts" behave correctly, given some > > definition of "correct." > > I guess the only way would be to "read" the output line by line and then > write it to the window... > > Thanks! > > A. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011009165048X.jkh>