*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Mon, 06 Mar 2006 09:55:58 +0100
changeset 3276 bade90c37606
parent 3275 435d179c606f
child 3277 065e0d75a384
*** empty log message ***
DialogBox.st
--- a/DialogBox.st	Mon Mar 06 09:55:43 2006 +0100
+++ b/DialogBox.st	Mon Mar 06 09:55:58 2006 +0100
@@ -2247,7 +2247,7 @@
     ^ self 
         requestFileName:titleString 
         default:defaultName
-        ok:(resources string:'Ok') 
+        ok:(resources string:'OK') 
         abort:(resources string:'Cancel') 
         pattern:pattern
         fromDirectory:nil
@@ -2282,7 +2282,7 @@
     ^ self 
         requestFileName:titleString 
         default:defaultName
-        ok:(resources string:'Ok') 
+        ok:(resources string:'OK') 
         abort:(resources string:'Cancel') 
         pattern:pattern
         fromDirectory:aDirectory
@@ -4641,19 +4641,33 @@
 
 !DialogBox class methodsFor:'smalltalk dialogs'!
 
+requestClass:aString
+    "launch a Dialog, which allows user to enter an existing classes name.
+     Return the entered class or nil (if cancel was pressed).
+     The entryField does classNameCompletion on TAB."
+
+     ^ self requestClass:aString okLabel:'OK' initialAnswer:nil.
+
+    "
+     Dialog 
+         requestClass:'Enter a class:'
+    "
+!
+
 requestClass:aString okLabel:okLabel initialAnswer:initial
-    "launch a Dialog, which allows user to enter a class name.
-     Return the entered string (may be empty string) or nil (if cancel was pressed).
+    "launch a Dialog, which allows user to enter an existing classes name.
+     Return the entered class or nil (if cancel was pressed).
      The entryField does classNameCompletion on TAB."
 
      |className|
 
      className := self requestClassName:aString okLabel:okLabel initialAnswer:initial.
+     className isEmptyOrNil ifTrue:[^ nil].
      ^ Smalltalk classNamed:className
 
     "
      Dialog 
-         requestClass:'enter a class:'
+         requestClass:'Enter a class:'
          okLabel:'OK'
          initialAnswer:'Arr'        
     "
@@ -8095,7 +8109,7 @@
 !DialogBox class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.242 2006-02-13 08:59:19 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.243 2006-03-06 08:55:58 cg Exp $'
 ! !
 
 DialogBox initialize!