Skip to content
This repository
Browse code

fix app repl prompt

  • Loading branch information...
commit 3997eecd2a1e960d527a6ceed39a36f358420222 1 parent 292c3d4
Jon Rose authored September 06, 2012
7  src/sketchpad/repl/app/component.clj
@@ -16,10 +16,13 @@
16 16
     (read-string (.take q)))
17 17
 
18 18
 (defn- sketchpad-prompt [rsta]
19  
-  (buffer.action/append-text rsta (str \newline (ns-name *ns*) "=> ")))
  19
+  (seesaw/invoke-later
  20
+    (let [prompt-ns (ns-name *ns*)]
  21
+      (buffer.action/append-text rsta (str \newline prompt-ns "=> ")))))
20 22
 
21 23
 (defn- sketchpad-printer [rsta value]
22  
-  (buffer.action/append-text rsta (str value)))
  24
+  (seesaw/invoke-later
  25
+    (buffer.action/append-text rsta (str value))))
23 26
 
24 27
 (defn- create-application-repl [repl-rsta]
25 28
   (let [application-repl-q (LinkedBlockingDeque. )
6  src/sketchpad/repl/app/sketchpad_repl.clj
@@ -31,10 +31,12 @@
31 31
 
32 32
 		(write
33 33
 		([c]
34  
-			(buffer.action/append-text rsta (str c))
  34
+			(seesaw/invoke-later
  35
+				(buffer.action/append-text rsta (str c)))
35 36
 			(proxy-super write c))
36 37
 		([cbuf off len]
37  
-			(buffer.action/append-text rsta (str cbuf))
  38
+			(seesaw/invoke-later
  39
+				(buffer.action/append-text rsta (str cbuf)))
38 40
 			(proxy-super write cbuf off len))))]
39 41
 		writer))
40 42
 

0 notes on commit 3997eec

Please sign in to comment.
Something went wrong with that request. Please try again.