IIUC, your issue is how to deal with using fields from sub-objects in a
ComboBox or similar controls.

IMO, the vast majority of ComboBox and similar controls don’t use fields
from sub-objects so it isn’t clear that we should make everybody pay the
cost of treating labelField as a “dot-path” expression.  That involves
scanning every character in the labelField for the “.” and if 99% of folks
don’t have “.” in the labelField, that’s probably not a good default
behavior because you did all of that scanning for nothing.

And thus, labelFunction was added to handle the sub-object case.  We did
add dot-path handling to DataGrid because DataGrid always works with
objects and never lists of simple values.

Now if you have this sub-object case often, which seems to be the case for
you, it could be worth creating a subclass of ComboBox that borrows the
code from DataGrid that handles dot-path expressions.  Or maybe it would
make sense to add a flag for doing the scanning into the SDK’s default
controls.  As always, you or anyone is welcome to provide such a patch.

-Alex

On 12/9/14, 7:49 AM, "CodeGirl" <[email protected]> wrote:

>The problem is that I have generic combo boxes which also use datafield
>and
>so yes, in this situation, its easy to solve but in the case of my other
>generic custom objects its not.   I only put this example to give an
>example
>of what I am asking rather than post the entire code of a custom combo box
>
>
>
>--
>View this message in context:
>http://apache-flex-users.2333346.n4.nabble.com/Datagrid-functions-with-obj
>ects-with-objects-tp9022p9037.html
>Sent from the Apache Flex Users mailing list archive at Nabble.com.

Reply via email to