Hi,

I'm on latest Pharo 3 trying to display items in a list with multiple selection, and do something when the selection changes.�

So I did a try with NewListModel. The first I explored were the arguments passed to #whenSelectedIndexChanged:. I think they only inform about the last index selected but not about the multiple selection. So I decided to ask the list its #selectedItems, but the answer was not what I expected also.

I'm not sure this is a bug to report or if I'm doing something wrong. I'll appreciate any help.�

Steps to reproduce:


a) do it:

me := NewListModel new.
me
items: (1 to: 2);
beMultipleSelection;
whenSelectedIndexChanged: [�
self logCr: me selectedItems ].
me openWithSpec.


=> in Transcript I see:

b) after a click on 1:

#()


c) after a shift+click on 2:

#(1)�


d) inspecting "me selectedItems"�

---> �#(1 2)�


So, result in d) is fine but not b) and c).


Thanks in advance,
Mart�n

PS: Before this, I tried to use a TreeModel and I found the issue discussed in"[Pharo-dev] [Spec] whenSelectedItemsChanged: on TreeModel".