#FEATURE by cg
authorClaus Gittinger <cg@exept.de>
Mon, 13 Aug 2018 12:43:30 +0200
changeset 6393 11db47c4ab58
parent 6392 22ceac28ebca
child 6394 73b674d9c5af
#FEATURE by cg class: DialogBox class added: #request:initialAnswer:title:
DialogBox.st
--- a/DialogBox.st	Mon Aug 13 12:32:30 2018 +0200
+++ b/DialogBox.st	Mon Aug 13 12:43:30 2018 +0200
@@ -4806,6 +4806,33 @@
     "Modified: 29.5.1996 / 14:28:24 / cg"
 !
 
+request:aString initialAnswer:initial title:titleString
+    "launch a Dialog, which allows user to enter something.
+     Return the entered string (may be empty string) or nil (if cancel was pressed)"
+
+    ^ self 
+        request:aString 
+        displayAt:nil 
+        centered:(ForceModalBoxesToOpenAtCenter ? false) 
+        action:nil 
+        initialAnswer:initial 
+        okLabel:nil 
+        cancelLabel:nil 
+        title:titleString 
+        onCancel:nil
+        list:nil
+        initialSelection:nil
+        entryCompletionBlock:nil
+
+    "
+     Dialog 
+         request:'enter a string:' 
+         initialAnswer:'the default'  
+    "
+
+    "Created: / 13-08-2018 / 11:25:55 / Claus Gittinger"
+!
+
 request:aString list:listOfChoices
     "launch a Dialog, which allows user to enter something,
      but adds a list of choices for fast input.