--- a/DialogBox.st Fri Feb 27 15:10:54 2015 +0100
+++ b/DialogBox.st Fri Feb 27 15:12:41 2015 +0100
@@ -1271,30 +1271,6 @@
"
!
-modifyingBoxWith:modifyBlock do:openingBlock
- "perform openingBlock (which usually creates a standard dialog box),
- but call modifyBlock right before the dialog is actually opened.
- 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
- modifyingBoxWith:[:box |
- box allViewBackground:Color red.
- ] do:[
- Dialog information:'hello'
- ].
- "
-!
-
warn:aString
"launch a Dialog to warn user"
@@ -1352,45 +1328,6 @@
"Modified: / 29-05-1996 / 15:23:14 / cg"
"Created: / 20-01-2012 / 15:54:26 / cg"
-!
-
-withOptoutOption:optOutAction labelled:labelString do:boxOpeningBlock
- "launch a Dialog to warn user.
- Add a 'do not show this dialog again'-like checkbox,
- and call optOutAction after the dialog, if the checkbox was indeed checked."
-
- |holder|
-
- holder := false asValue.
- Dialog aboutToOpenBoxNotificationSignal handle:[:ex |
- |box|
-
- box := ex box.
- box verticalPanel add:((CheckBox label:labelString) model:holder).
- ] do:boxOpeningBlock.
- holder value ifTrue: optOutAction
-
- "
- Dialog
- withOptoutOption:[Transcript flash]
- labelled:'opt out'
- do:[ Dialog confirm:'some question' ].
- "
-!
-
-withOptoutOption:optOutAction labelled:labelString warn:warnString
- "launch a Dialog to warn user.
- Add a 'do not show this dialog again'-like checkbox,
- and call optOutAction after the warning, if the checkbox was indeed checked."
-
- self
- withOptoutOption:optOutAction
- labelled:labelString
- do:[self warn:warnString]
-
- "
- Dialog withOptoutOption:[Transcript flash] labelled:'opt out' warn:'some warning'.
- "
! !
!DialogBox class methodsFor:'confirmation dialogs'!
@@ -6175,6 +6112,71 @@
"Modified: / 02-03-2007 / 12:09:15 / cg"
! !
+!DialogBox class methodsFor:'on the fly modifications'!
+
+modifyingBoxWith:modifyBlock do:openingBlock
+ "perform openingBlock (which usually creates a standard dialog box),
+ but call modifyBlock right before the dialog is actually opened.
+ 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
+ modifyingBoxWith:[:box |
+ box allViewBackground:Color red.
+ ] do:[
+ Dialog information:'hello'
+ ].
+ "
+!
+
+withOptoutOption:optOutAction labelled:labelString do:boxOpeningBlock
+ "launch a Dialog to warn user.
+ Add a 'do not show this dialog again'-like checkbox,
+ and call optOutAction after the dialog, if the checkbox was indeed checked."
+
+ |holder|
+
+ holder := false asValue.
+ Dialog aboutToOpenBoxNotificationSignal handle:[:ex |
+ |box|
+
+ box := ex box.
+ box verticalPanel add:((CheckBox label:labelString) model:holder).
+ ] do:boxOpeningBlock.
+ holder value ifTrue: optOutAction
+
+ "
+ Dialog
+ withOptoutOption:[Transcript flash]
+ labelled:'opt out'
+ do:[ Dialog confirm:'some question' ].
+ "
+!
+
+withOptoutOption:optOutAction labelled:labelString warn:warnString
+ "launch a Dialog to warn user.
+ Add a 'do not show this dialog again'-like checkbox,
+ and call optOutAction after the warning, if the checkbox was indeed checked."
+
+ self
+ withOptoutOption:optOutAction
+ labelled:labelString
+ do:[self warn:warnString]
+
+ "
+ Dialog withOptoutOption:[Transcript flash] labelled:'opt out' warn:'some warning'.
+ "
+! !
+
!DialogBox class methodsFor:'private'!
showAndThenDestroyBox:aBox
@@ -10322,11 +10324,11 @@
!DialogBox class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.366 2015-02-27 14:10:54 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.367 2015-02-27 14:12:41 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.366 2015-02-27 14:10:54 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.367 2015-02-27 14:12:41 cg Exp $'
! !