home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dove!dove.nist.gov!przemek
- From: przemek@rrdstrad.nist.gov (Przemek Klosowski)
- Newsgroups: comp.lang.tcl
- Subject: Tcl interaction in my own window
- Message-ID: <PRZEMEK.92Jul21120718@rrdstrad.nist.gov>
- Date: 21 Jul 92 16:07:18 GMT
- Sender: news@dove.nist.gov
- Organization: U. of Maryland/NIST
- Lines: 38
-
-
- Hello, fellow Tcl/Tk users,
-
- I submitted this query once before, but I did not see it in the newsgroup,
- so I assume that it was lost, and resubmit it now. Sorry if you do see it
- second time around.
-
- I am writing a Tcl application that will have a Tcl interaction
- window. I could have followed Wish's example by keeping the
- interaction in the original shell/xterm window, but instead I chose
- to open a a separate toplevel widget containing a scrolled text window
- and an entry window. The carriage return in the "entry' widget is
- bound to
-
- proc interactive.command { wframe } {
- set command [$wframe.entry get]
- $wframe.l.list insert end "$command =>"
- $wframe.l.list insert end [eval $command]
- }
-
- so, as you can see, both the command and its result get inserted in
- the scrolled window. Now, the problem is that the errors are still
- printed to the shell window. Is there a way of intercepting Tcl error
- messages/printouts to put them, let say, in a separate message window?
-
- In general, do people have comments on this whole setup? I welcome
- both followup posts and e-mail; if there's enough e-mail I will
- summarize.
-
-
-
- --
- przemek klosowski (przemek@rrdstrad.nist.gov)
- Reactor Division (bldg. 235), E111
- National Institute of Standards and Technology
- Gaithersburg, MD 20899, USA
-
- (301) 975 6249
-