Re: Can't figure out how to use binding

2010-04-28 Thread Meikel Brandmeyer
Hi, On 28 Apr., 01:52, SpiderPig wrote: >      (.start (Thread. #(clojure.main/repl bindings are thread-local. So your in/out bindings are not valid in the new thread. Try the following: (.start (Thread. (bound-fn [] (clojure.main/repl))) Sincerely Meikel -- You received this message be

Can't figure out how to use binding

2010-04-28 Thread SpiderPig
Hi, I wrote this code to redirect a repl to a JFrame. I used the JConsole class from Beanshell (def console (bsh.util.JConsole.)) (def frame (doto (javax.swing.JFrame.) (.add console) (.setSize 500 500) (.setVisible true) )) (binding [*out* (java.io.OutputStreamWriter. (.getOut console))]