Permalink
Browse files

fix app repl prompt

  • Loading branch information...
1 parent 292c3d4 commit 3997eecd2a1e960d527a6ceed39a36f358420222 @ghostandthemachine committed Sep 7, 2012
Showing with 9 additions and 4 deletions.
  1. +5 −2 src/sketchpad/repl/app/component.clj
  2. +4 −2 src/sketchpad/repl/app/sketchpad_repl.clj
View
7 src/sketchpad/repl/app/component.clj
@@ -16,10 +16,13 @@
(read-string (.take q)))
(defn- sketchpad-prompt [rsta]
- (buffer.action/append-text rsta (str \newline (ns-name *ns*) "=> ")))
+ (seesaw/invoke-later
+ (let [prompt-ns (ns-name *ns*)]
+ (buffer.action/append-text rsta (str \newline prompt-ns "=> ")))))
(defn- sketchpad-printer [rsta value]
- (buffer.action/append-text rsta (str value)))
+ (seesaw/invoke-later
+ (buffer.action/append-text rsta (str value))))
(defn- create-application-repl [repl-rsta]
(let [application-repl-q (LinkedBlockingDeque. )
View
6 src/sketchpad/repl/app/sketchpad_repl.clj
@@ -31,10 +31,12 @@
(write
([c]
- (buffer.action/append-text rsta (str c))
+ (seesaw/invoke-later
+ (buffer.action/append-text rsta (str c)))
(proxy-super write c))
([cbuf off len]
- (buffer.action/append-text rsta (str cbuf))
+ (seesaw/invoke-later
+ (buffer.action/append-text rsta (str cbuf)))
(proxy-super write cbuf off len))))]
writer))

0 comments on commit 3997eec

Please sign in to comment.