Re: [tcljava-user] Jacl documentation
Brought to you by:
mdejong
From: Wei D. <wd...@fn...> - 2006-11-25 16:31:38
|
I am not planning to manipulate them; all I want is to be able to retrieve them since we wanted to provide a console log that display what user would see if they run tclsh directly. So if puts commands result only comes from the STDOUT, I need to a way to get it. Same for the STDERR, it seems to me that Interp.getResults can provide error message in the error case, but is it the same message that I would get from STDERR? Thanks and Happy Holidays :) -----Original Message----- From: tcl...@li... [mailto:tcl...@li...] On Behalf Of rahul Sent: Thursday, November 23, 2006 10:53 AM To: A list for users of tcljava Subject: Re: [tcljava-user] Jacl documentation Hi Wei [Wei Dai:] | I wanted to understand the Jacl threading module and how can I get | STDOUT and STDERR using Jacl APIs.=20 Please do explain what you intend to do with STDERR and STDOUT, they are used by the tcl commands to print the results, and I am not sure how you are planning to manipuate them. How ever, if you are planning to capture the results of an expression evaluation, then Interp.getResult should give you the result. If you are checking for any exceptions, just catching the TclException and checking the Interp.getResult should give you the exception raised. (check the Shell.java for example on using it.) | I also wanted to know if Interp.GetResults can be the used as STDOUT or | STDERR. I have noticed most time that it seems to be the STDOUT or | STDERR, but it does not give me STDOUT when it comes to commands like | puts.=20 If you are familiar with java, puts behaves similar to System.out.println (by default with out a channel) while the Interp.getResult gives you the value of an expression evaluated. (like that of a function call in java.) rahul ------------------------------------------------------------------------ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDE V _______________________________________________ tcljava-user mailing list tcl...@li... https://lists.sourceforge.net/lists/listinfo/tcljava-user |