Does anyone know whether AR
62069 “MultiSelectionInList not returning selections in selection order” is included in 7.9.1? I had some code with problems when
accessing selections in MultiSelectionInList. To correct the problems I added two
methods which answers selections sorted.
I did not look deep into
my problems, and I did not try to make any examples showing the problems.
Below are the two methods
I added. Note that they are exactly like the existing methods #selectionIndexes
and #selections, but they make sure indexes and objects are sorted.
selectionIndexesSorted
^self selectionIndexes asSortedCollection
selectionsSorted
| list
selections indices |
selections
:= OrderedCollection new.
indices
:= selectionIndexHolder value sorted.
list :=
listHolder value.
indices
do: [:eachIndex |
(eachIndex
between: 1 and: list size) ifTrue: [selections add: (list at: eachIndex)]].
^selections
Kind regards,
Runar
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc