Issue #87: Error when trying to find a Class (part 1)
Sigh, the dialog (`SmallSense::ClassSearchDialog`) returns an empty
collection when it's cancelled but `false` when it's closed by
a little X button on window decoration. Since this is deep in
`SimpleDialog` and `WindowGroup` code, workaround it by testing for
size being 0, exploiting the fact that `false size` is 0.
This fixes the problem reported in comment 1 of the bug, not the
original problem.
https://swing.fit.cvut.cz/projects/stx-jv/ticket/87#comment:1
--- a/extensions.st Sat Apr 23 18:05:54 2016 +0100
+++ b/extensions.st Thu May 05 22:05:53 2016 +0200
@@ -1051,7 +1051,7 @@
classes := box open.
- classes isEmptyOrNil ifTrue:[ ^ nil ].
+ classes size == 0 ifTrue:[ ^ nil ].
self assert: classes size == 1.
className := classes anElement name.
@@ -1070,7 +1070,7 @@
^ className
"Created: / 28-04-2014 / 23:41:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 25-11-2014 / 13:08:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 05-05-2016 / 16:47:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!UserPreferences methodsFor:'accessing-SmallSense'!