Add class name completion.
authorStefan Vogel <sv@exept.de>
Tue, 27 Jan 1998 10:22:38 +0100
changeset 482 00acfc336304
parent 481 e2e1ea013229
child 483 73fa8faad5b1
Add class name completion.
UIPainter.st
--- a/UIPainter.st	Tue Jan 27 10:20:25 1998 +0100
+++ b/UIPainter.st	Tue Jan 27 10:22:38 1998 +0100
@@ -2415,13 +2415,23 @@
     box okText:'OK'.
     box abortText:'Cancel'.
     box initialText: 'ApplicationModel'.
+    box entryCompletionBlock:[:contents |
+        |s what m|
+
+        s := contents withoutSpaces.
+        what := Smalltalk classnameCompletion:s.
+        box contents:what first.
+        (what at:2) size ~~ 1 ifTrue:[
+            self beep
+        ]
+    ].
     box showAtPointer.
     box accepted
-    ifTrue:
-    [            
+    ifTrue:[            
         self loadFromInClassesOf: box contents asSymbol
     ]
 
+    "Modified: / 27.1.1998 / 09:30:27 / stefan"
 !
 
 loadFromInClassesOf: aSuperclassOrSymbol