--- a/MultiSelectionInList.st Wed Apr 02 18:26:38 2003 +0200
+++ b/MultiSelectionInList.st Wed Apr 02 18:27:31 2003 +0200
@@ -10,6 +10,8 @@
hereby transferred.
"
+"{ Package: 'stx:libwidg' }"
+
SelectionInList subclass:#MultiSelectionInList
instanceVariableNames:''
classVariableNames:''
@@ -99,16 +101,20 @@
!
selectionIndex:indexes
- "set list of indexes
- "
+ "set the list of indexes"
+
+ |newIndices|
+
indexes size ~~ 0 ifTrue:[
- ^ super selectionIndex:indexes
+ newIndices := indexes.
+ ] ifFalse:[
+ indexes isNumber ifTrue:[
+ newIndices := OrderedCollection with:indexes
+ ] ifFalse:[
+ newIndices := #()
+ ].
].
-
- (indexes isCollection or:[indexes isNil]) ifTrue:[
- ^ super selectionIndex:#()
- ].
- ^ super selectionIndex:(OrderedCollection with:indexes)
+ ^ super selectionIndex:newIndices
!
selectionIndexes
@@ -192,5 +198,5 @@
!MultiSelectionInList class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/MultiSelectionInList.st,v 1.16 1998-01-14 15:17:01 ca Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/MultiSelectionInList.st,v 1.17 2003-04-02 16:27:31 cg Exp $'
! !