AR “62069 MultiSelectionInList not returning selections in selection order” corrected?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

AR “62069 MultiSelectionInList not returning selections in selection order” corrected?

Runar Jordahl

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
Reply | Threaded
Open this post in threaded view
|

Re: AR “62069 MultiSelectionInList not returning selections in selection order” corrected?

Holger Kleinsorgen
Runar Jordahl wrote
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.
The AR was included in 7.9. The implementation of #selections has changed in 7.10.


7.7 - 7.8.1
Returns an OrderedCollection in list order
       
7.9 - 7.9.1
Returns an OrderedCollection  in selection order

7.10
Returns an OrderedCollection  in selection order, without duplicates (AR 67158, Res102772)
Reply | Threaded
Open this post in threaded view
|

Re: AR “62069 MultiSelectionInList not returning selections in selection order” corrected?

Runar Jordahl
Thank you so much for that information!
Runar

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc