https://groups.google.com/forum/?fromgroups=#!topic/clojure/hNyrwx3mYvQ
Redirecting standard out to something.
(def out
(proxy [java.io.Writer] []
(close [])
(flush [])
(write [thing]
(. (new javax.swing.JFrame (str "a" thing)) setVisible true))))
(binding [*out* out]
(println "hello"))
Redirecting standard out to something.
(def out
(proxy [java.io.Writer] []
(close [])
(flush [])
(write [thing]
(. (new javax.swing.JFrame (str "a" thing)) setVisible true))))
(binding [*out* out]
(println "hello"))
'Programming' 카테고리의 다른 글
(Clojure) Simple way to replace nth element in a vector in clojure? (0) | 2012.12.26 |
---|---|
(Clojure) Type Hints (0) | 2012.12.25 |
(Java) Redirecting System.out and System.err to JTextPane or JTextArea (0) | 2012.12.23 |
Clojure Swing (0) | 2012.12.23 |
Clojure 강좌 (0) | 2012.12.18 |