ext/ui/SimpleViewInteractor.st
branchjv
changeset 660 ac2098963e59
parent 659 1a5c26f6f5b7
child 681 61b376859809
--- a/ext/ui/SimpleViewInteractor.st	Sat Jul 09 22:30:00 2016 +0100
+++ b/ext/ui/SimpleViewInteractor.st	Mon Jul 18 20:50:27 2016 +0100
@@ -72,15 +72,18 @@
     blocker1 := Semaphore new.
     blocker2 := Semaphore new.
 
-    view pushAction:[ 
+    view sensor pushAction:[ 
         blocker1 signal.
         aBlock valueWithOptionalArgument: view.
         blocker2 signal.
     ].
     blocker1 wait.
-    blocker2 wait.
+    (blocker2 waitWithTimeoutMs: timeout) isNil ifTrue:[ 
+        self error: 'User action did not finish in ', timeout printString , 'ms'.
+    ].
 
     "Created: / 31-01-2015 / 08:27:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 18-07-2016 / 18:56:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 type: value
@@ -172,6 +175,14 @@
 
     "Created: / 23-07-2014 / 07:35:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 12-02-2015 / 00:07:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+wait
+    "Wait (block the caller) until all event is the event queue are processed."
+
+    self do:[] timeout: nil
+
+    "Created: / 18-07-2016 / 18:58:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !SimpleViewInteractor methodsFor:'navigation'!