[Tcl Java] evalFile question

1999-05-10 Thread david shen
Hi, guys I would like to complete the following using both java and jacl. 1) run a tcl file 2) direct the output to a file 3) analyze the file My only poor solution is the following 1) class ExecCommand() { main() { Interp interp; interp = new Interp(); interp.evalFile("hello.

[Tcl Java] Re: evalFile question

1999-05-10 Thread Moses DeJong
On Mon, 10 May 1999, david shen wrote: > Hi, guys You could redirect the output of the Java (and therefore the Jacl) process using the java.lang.System class. The methods are called setIn(InputStream) and setOut(PrintStream). You code would look something like this. FileOutputStream fos = new F

[Tcl Java] traces

1999-05-10 Thread Johnson, Bruce
I've been having a little trouble with implementing traces for the widget variables used in my Swank package (a Tk-like interface to Swing). Below is some example Java code that implements a trace on a variable (in this case for a textual widget, like an entry). The code works fine until you try

[Tcl Java] Re: Eventcallback from java to TCL

1999-05-10 Thread Moses DeJong
On Mon, 10 May 1999, Marcel Ruff wrote: > Hi, > > I use a SWING GUI, invoked by a TCL script. It sounds like you might be doing this incorrectly. You need to place and event into the Tcl event queue. If you just call interp.eval() it will screw things up. > If i want to callback a TCL procedur

[Tcl Java] Eventcallback from java to TCL

1999-05-10 Thread Marcel Ruff
Hi, I use a SWING GUI, invoked by a TCL script. If i want to callback a TCL procedure from Swing, Swing hangs after the second try. Im using the tcl.lang.Interp.eval() for the callback Using a java::bind MouseListener callback works fine (but is not exactly what i need). This seems to trigger s