added #waitUntilClosed (mostly for rdoit)
authorClaus Gittinger <cg@exept.de>
Wed, 20 May 1998 18:05:35 +0200
changeset 2124 750a1fc2a510
parent 2123 b2dae4453526
child 2125 664f8101c8d2
added #waitUntilClosed (mostly for rdoit)
TopView.st
--- a/TopView.st	Wed May 20 15:39:07 1998 +0200
+++ b/TopView.st	Wed May 20 18:05:35 1998 +0200
@@ -251,6 +251,29 @@
     "Modified: 3.5.1996 / 23:49:36 / stefan"
 !
 
+waitUntilClosed
+    "wait until the receiver has been closed.
+     Can be used to synchronize multiple-window applications,
+     and (especially) to wait until an application session is finished
+     when invoking commands with the rDoit mechanism"
+
+    [drawableId isNil] whileFalse:[
+        Delay waitForSeconds:0.1.
+    ].
+
+    "asynchronous:
+
+     EditTextView open
+    "
+
+    "synchronous:
+
+     EditTextView open topView waitUntilClosed
+    "
+
+    "Modified: / 20.5.1998 / 18:03:37 / cg"
+!
+
 withCursor:aCursor do:aBlock
     "evaluate aBlock while showing aCursor in all my views.
      Return the value as returned by aBlock."
@@ -576,5 +599,5 @@
 !TopView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/TopView.st,v 1.51 1998-04-28 14:19:00 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/TopView.st,v 1.52 1998-05-20 16:05:35 cg Exp $'
 ! !