#BUGFIX by stefan
authorStefan Vogel <sv@exept.de>
Wed, 05 Feb 2020 13:52:58 +0100
changeset 6813 73a74c77554b
parent 6812 e012b62927a6
child 6814 e9155e18dfb4
#BUGFIX by stefan class: DialogBox class changed: #request:displayAt:centered:action:initialAnswer:okLabel:cancelLabel:title:onCancel:list:initialSelection:entryCompletionBlock: #ensure: block to destroy box on abort (e.g. via Timeout-Pin - see 15_Standard_Library_Test.ets)
DialogBox.st
--- a/DialogBox.st	Fri Jan 31 17:32:01 2020 +0100
+++ b/DialogBox.st	Wed Feb 05 13:52:58 2020 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1994 by Claus Gittinger
 	      All Rights Reserved
@@ -4699,16 +4697,19 @@
 
     centered := centeredOrNil ? (ForceModalBoxesToOpenAtCenter ? false).
 
-    aPoint notNil ifTrue:[
-        box showAt:aPoint center:centered
-    ] ifFalse:[
-        centered ifTrue:[
-            box showAtCenter
+    [
+        aPoint notNil ifTrue:[
+            box showAt:aPoint center:centered
         ] ifFalse:[
-            box showAtPointer
-        ]
-    ].
-    box destroy. 
+            centered ifTrue:[
+                box showAtCenter
+            ] ifFalse:[
+                box showAtPointer
+            ]
+        ].
+    ] ensure:[    
+        box destroy.
+    ].    
     ^ cancelValue value.
 
     "
@@ -4770,6 +4771,7 @@
     "Modified: / 05-05-1999 / 10:50:22 / cg"
     "Modified (comment): / 03-08-2017 / 14:38:57 / cg"
     "Modified: / 01-07-2018 / 10:09:02 / Claus Gittinger"
+    "Modified: / 05-02-2020 / 13:29:05 / Stefan Vogel"
 !
 
 request:aString displayAt:aPoint centered:centered action:resultAction initialAnswer:initial onCancel:cancelValue