This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Another question: where does display go?
On 08/26/2011 07:46 PM, John-Paul Verkamp wrote:
Another quick question that has me scratching my head: Where does display go?
First note that display takes an optional parameters, so you can explicitly
re-direct the output to any output-port (or java.io.Writer).
My goal is to have a GUI that interacts with Kawa and for the most
part it's working wonderfully. But anything that prints directly
(particularly display and trace) aren't working. The output isn't
appearing either in the console or through the system that I built to
redirect the console to my own PrintStream (hoping that would help).
Note that current-output-port is a parameter, so you can change it
with one of:
(current-output-port ALTERNATE-PORT)
(set! (current-output-port) ALTERNATE-PORT)
(parameterize ((current-output-port ALTERNATE-PORT)) BODY)
You can also call the Java method gnu.mapping.OutPort#setOutDefault.
Hope this allows you to find a solution.
--
--Per Bothner
per@bothner.com http://per.bothner.com/