--- a/DialogBox.st Thu Jul 03 18:36:28 2014 +0200
+++ b/DialogBox.st Thu Jul 03 18:37:48 2014 +0200
@@ -4732,6 +4732,77 @@
"Modified: 29.5.1996 / 14:28:59 / cg"
!
+request:aString title:windowTitle
+ "launch a Dialog, which allows user to enter a string."
+
+ ^ self
+ request:aString
+ displayAt:nil
+ centered:(ForceModalBoxesToOpenAtCenter ? false)
+ action:nil
+ initialAnswer:nil
+ okLabel:nil
+ cancelLabel:nil
+ title:windowTitle
+ onCancel:''
+ list:nil
+ initialSelection:nil
+
+ "
+ at topLeft (centering is suppressed, to make the box fully visible)
+ Dialog
+ request:'enter a string:'
+ displayAt:0@0
+ centered:true
+ action:[:result | result printNewline]
+ initialAnswer:'the default'
+ onCancel:#foo
+
+ centered around 200@200:
+
+ Dialog
+ request:'enter a string:'
+ displayAt:200@200
+ centered:true
+ action:[:result | result printNewline]
+ initialAnswer:'the default'
+ onCancel:#foo
+
+ topLeft of box at 200@200:
+
+ Dialog
+ request:'enter a string:'
+ displayAt:200@200
+ centered:false
+ action:[:result | result printNewline]
+ initialAnswer:'the default'
+ onCancel:#foo
+
+ under mouse pointer:
+
+ Dialog
+ request:'enter a string:'
+ displayAt:nil
+ centered:false
+ action:[:result | result printNewline]
+ initialAnswer:'the default'
+ onCancel:#foo
+
+ centered on the screen:
+
+ Dialog
+ request:'enter a string:'
+ displayAt:nil
+ centered:true
+ action:[:result | result printNewline]
+ initialAnswer:'the default'
+ onCancel:#foo
+ "
+
+ "Created: 7.12.1995 / 23:14:10 / cg"
+ "Modified: 29.5.1996 / 14:24:39 / cg"
+!
+
request:aString title:titleString initialAnswer:initial
"launch a Dialog, which allows user to enter something.
Return the entered string (may be empty string) or nil (if cancel was pressed)"
@@ -10179,11 +10250,11 @@
!DialogBox class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.358 2014-06-13 21:06:30 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.359 2014-07-03 16:37:48 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.358 2014-06-13 21:06:30 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.359 2014-07-03 16:37:48 cg Exp $'
! !