Fix class selection drop-in dialog
Commit 93164087c56a added class selection dialog
to SmallSense's `DialogBox`. This commit selever bugs
in the implementation.
--- a/SmallSense__DialogBox.st Fri Apr 21 12:28:42 2023 +0100
+++ b/SmallSense__DialogBox.st Thu Jun 01 20:20:33 2023 +0100
@@ -1,5 +1,5 @@
"
-COPYRIGHT (c) 2022 LabWare
+COPYRIGHT (c) 2022-2023 LabWare
stx:goodies/smallsense - A productivity plugin for Smalltalk/X IDE
@@ -32,7 +32,7 @@
copyright
"
-COPYRIGHT (c) 2022 LabWare
+COPYRIGHT (c) 2022-2023 LabWare
stx:goodies/smallsense - A productivity plugin for Smalltalk/X IDE
@@ -102,21 +102,23 @@
Return the entered string (may be empty string) or nil (if cancel was pressed).
The entryField does classNameCompletion on TAB."
- | dialog |
+ | dialog class |
UserPreferences current smallSenseNewDialogsEnabled ifFalse:[
^ super requestClassName:title list: classesOrNil okLabel:okLabel initialAnswer:initialTextOrNil
].
dialog := SmallSense::ClassSelectDialog new.
dialog title: title.
- dialog filter: [ :cls | classesOrNil isNil or:[classesOrNil includes: cls name] ].
+ dialog filter: [ :cls | classesOrNil isNil or:[classesOrNil includes: cls ] ].
initialTextOrNil notNil ifTrue: [
dialog pattern: initialTextOrNil.
dialog selection: initialTextOrNil.
].
- ^ dialog open.
+ class := dialog open.
+ ^ class name
"Created: / 24-08-2022 / 14:45:09 / Jan Vrany <jan.vrany@labware.com>"
+ "Modified: / 01-06-2023 / 19:42:27 / Jan Vrany <jan.vrany@labware.com>"
!
requestProject:title from:listOfProjects initialAnswer:initialTextOrNil suggestions:suggestions