flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: [jira] [Updated] (FLEX-34852) Allow sorting by complex fields in ListCollectionView
Date Fri, 22 May 2015 15:46:31 GMT

On 5/22/15, 8:29 AM, "Mihai Chira" <mihai.chira@gmail.com> wrote:

>See, I'm glad I started this dialogue. Indeed, I was just planning to
>detect complex sort fields by the presence of a "." in them. Now,
>after writing a simple unit test, I realised that dynamic Objects can
>have fields with "." in them by saying obj["field.with.dot"] = 1; But
>I also just noticed that DataGrid does exactly the same (assume that a
>dataField with a "." in it implies a complex field. See
>spark.components.gridClasses.GridColumn.set dataField), and that you
>cannot bind to fields with "." in them.
>Should we then 1) allow for dots in object fields and thus also change
>GridColumn somehow? or 2) just assume that people won't sort by
>properties with dots in them unless they're complex fields?

The way I look at is it that DG has had this assumption about “." for a
long time so it isn’t required to change it, even to make it consistent.
But given that Sort hasn’t made this assumption for even longer, it is
risky to change that now.  So even though it is inconsistent with
GridColumn (and even further back, mx:DataGridColumn) I would add a flag
to get the new behavior or add a new set of Sort classes with the new
behavior.  Also, DG virtually always works with complex data where as a
ListCollectionView can work with simple data so it is slightly more
reasonable for DG to make assumptions about “.”

BTW, I don’t think it is just Object.  I think XML attributes and tags can
have “.” in them as well.

Good luck, and thanks for working on it.


View raw message