Hello:
I have a Jess rule that prints some statements when rule fires
(defrule test
(pattern to match)
=>
(printout WSTDOUT "Pattern found") )
When the rule fires, it correctly prints "Pattern found" in the
Java console. I would like to have this displayed in my GUI's
JTextArea box.
I redirected the standard output stream by providing a subclass of
PrintStream (MyPrintStream.java) that overrides the println()
method implementation to append to the JTextarea. Then, I set the
output stream using:
PrintStream ps = new MyPrintStream(resultsArea);
System.setOut(ps);
It works well for the usual println()..in the sense all
System.out.println() in the code are appended to the JTextArea.
However, the RHS of the rule, (printout WSTDOUT "...") still
prints to the Java command console instead of the JTextArea.
Any suggestions?
Thanks in advance.
Kapil Dukle
University of South Carolina
--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------