So i have a ArrayCollection that i sort.
var sort:Sort = new Sort;
sort.fields = [new SortField("my_field")];
myArrayCollection.sort = sort;
This collection is the data provider in my spark list... and an event for change...
in my event i have ...
protected function list_changeHandler(event:IndexChangeEvent):void
the message_list.selectedItem is incorrect. It is a different item than the one in the list. If i comment out the sorting part it works just fine, message_list.selectedItem is correct, with the sort the item is incorrect.
Is this a bug? Am i doing something wrong?
I should also say i'm on Flash Builder 4.0.1
Oh ignore, when i was updating the list it was changing the sort out from under me which meant my index was bad.