--- a/MultiSelectionInList.st Sat Apr 20 15:52:21 1996 +0200
+++ b/MultiSelectionInList.st Sat Apr 20 15:54:48 1996 +0200
@@ -48,7 +48,7 @@
|l|
l := self list.
- l isNil ifTrue:[^ 0]. "/ mhmh - no list; what should we do here ?
+ l isNil ifTrue:[^ self zeroIndex]. "/ mhmh - no list; what should we do here ?
^ selectionIndexHolder value
collect:[:index |
@@ -56,7 +56,7 @@
]
"Created: 26.10.1995 / 16:52:27 / cg"
- "Modified: 16.4.1996 / 15:52:57 / cg"
+ "Modified: 20.4.1996 / 13:14:29 / cg"
!
selection:anObjectList
@@ -82,21 +82,15 @@
"Modified: 16.4.1996 / 15:53:03 / cg"
! !
-!MultiSelectionInList methodsFor:'initialization'!
-
-initialize
- self listHolder:(nil asValue). "/ could also use an empty collection here
- self selectionIndexHolder:(Array new asValue).
+!MultiSelectionInList methodsFor:'queries'!
- "Created: 26.10.1995 / 16:30:22 / cg"
-! !
-
-!MultiSelectionInList methodsFor:'private'!
+zeroIndex
+ "return the selectionIndex returned when nothing is selected.
+ Here, an empty collection is returned."
-clearSelection
- selectionIndexHolder setValue:(Array new).
+ ^ Array new
-
+ "Modified: 20.4.1996 / 13:12:58 / cg"
! !
!MultiSelectionInList methodsFor:'selections'!
@@ -106,17 +100,17 @@
selectionIndices := selectionIndexHolder value.
(selectionIndices isNil
- or:[selectionIndices == 0
+ or:[selectionIndices == 0
or:[selectionIndices isEmpty]]) ifFalse:[
^ selectionIndices collect:[:index | listHolder value at:index]
].
^ Array new
- "Modified: 16.4.1996 / 12:15:34 / cg"
+ "Modified: 20.4.1996 / 13:13:21 / cg"
! !
!MultiSelectionInList class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/MultiSelectionInList.st,v 1.9 1996-04-16 18:48:22 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/MultiSelectionInList.st,v 1.10 1996-04-20 13:54:48 cg Exp $'
! !