<mx:ListCollectionView id="lcv_People" list={MyParty.people}
sort={myViewSpecificNameSort}/>

<mx:TileList dataProvider="{lcv_People}" />

Ah!!! mxml, of course! It's so funny how I had been thinking in terms of doing everything in actionscript, that I missed this most obvious solution. Not to say this couldn't be done in actionscript, but it does seem much cleaner to do it in mxml and take advantage of the automatic binding and events. Thanks for this example, it seems to reflect my intentions better which is to create a 'view' into my data, sort that data for the user and then bind that 'view' to some display object. The two lines above say that much more clearly to me.

I still haven't seen a compelling reason why you would insist your
data is persisted/handled in sorted order. It appears that your users
want to see the objects sorted, so sort them when you show them.

Absolutely. I agree. The data only needs to be sorted for the user's convenience therefor it makes sense to associate this sorting only to the specific view.

Thanks for talking this out with me. Having someone else's insight always helps to clarify my own.

All the best,

Kevin

Reply via email to