@Alex didn't know that MX components received this kind of upgrades in the 4.x branch, I thought they were in "maintenance mode" (exluding the work on spark skins for halo).
2012/4/10 Cosma Colanicchia <cosma...@gmail.com>: > The EmptyItemComboBox class posted by David Coleman looks similar to > some code I posted years ago on StackOverflow [1]. I added some > explanation and a snippet of code showing its usage there. > > I'm not particularly proud of this code, but didn't managed to find a > better way. The behavior approach seems interesting. > > [1] http://stackoverflow.com/questions/949180/null-in-flex-combobox > > > Cosma > > > 2012/4/10 Alex Harui <aha...@adobe.com>: >> >> >> >> On 4/10/12 12:17 PM, "Jeffry Houser" <jef...@dot-com-it.com> wrote: >> >>> I gave it a selectedValue property, a valueField property, and a >>> valueFunction property; similar--in concept--to how the selectedItem, >>> labelField, and labelFunction work. >>> >>> Really the code is just a layer of abstraction for a loop. If I were >>> to implement something like that in the framework, I'd probably to up to >>> List or ListBase as opposed to making it ComboBox specific. >>> >> And for the record, starting in Flex 4, MX Combobox had this function >> property [1]. It was not implemented in Spark. But these days I am a fan >> of plugging in things like this. >> >> [1] >> http://help.adobe.com/en_US/FlashPlatform//reference/actionscript/3/mx/contr >> ols/listClasses/ListBase.html#selectedItemsCompareFunction >> >> -- >> Alex Harui >> Flex SDK Team >> Adobe Systems, Inc. >> http://blogs.adobe.com/aharui >>