#REFACTORING by stefan
authorStefan Vogel <sv@exept.de>
Wed, 16 May 2018 08:37:31 +0200
changeset 6320 d52325b32f05
parent 6319 beb48f66edf1
child 6321 cf13accef85c
#REFACTORING by stefan class: DialogBox class changed: #initialize #modifyingBoxWith:do: fix return value
DialogBox.st
--- a/DialogBox.st	Fri May 11 13:09:27 2018 +0200
+++ b/DialogBox.st	Wed May 16 08:37:31 2018 +0200
@@ -1113,7 +1113,9 @@
     DefaultFocusToOKOnLeave := false.
 
     "/ for backward whitebox compatibility (customer subclasses which access the classVar directly)
-    AboutToOpenBoxNotificationSignal := SimpleView aboutToOpenBoxNotificationSignal
+    AboutToOpenBoxNotificationSignal := self aboutToOpenBoxNotificationSignal
+
+    "Modified: / 15-05-2018 / 20:03:02 / stefan"
 ! !
 
 !DialogBox class methodsFor:'common dialogs'!
@@ -6384,22 +6386,20 @@
      This allows modifyBlock to add additional controls to the dialog.
      ModifyBlock is called with the box as argument."
 
-    Dialog aboutToOpenBoxNotificationSignal handle:[:ex |
-        |box|
-
-        box := ex box.
-        modifyBlock value:box.
-        ex proceed.
-    ] do:openingBlock.
-
-    "
-     Dialog 
+    ^ openingBlock on:self aboutToOpenBoxNotificationSignal do:[:ex |
+        modifyBlock value:ex box.
+    ].
+
+    "
+     DialogBox 
         modifyingBoxWith:[:box |
             box allViewBackground:Color red.
         ] do:[
             Dialog information:'hello'
         ].
     "
+
+    "Modified (comment): / 15-05-2018 / 20:56:41 / stefan"
 !
 
 withCheckBoxFor:checkModel labelled:checkLabel do:boxOpeningBlock