Ok, in my (brand new) github at [1] I tried to reimplement the thing,
refactoring the EmptyItemComboBox code into an IList implementation as
suggested by Alex.

I also quickly adapted the same simple test app that I attached to the
stackoverflow response to see the class in action [2].

[1] 
https://github.com/cosma/Apache-Flex-Personal-Whiteboard/blob/master/FixedElementsList.as

[2] 
https://github.com/cosma/Apache-Flex-Personal-Whiteboard/blob/master/FixedElementsListDemo.mxml


2012/4/10 Cosma Colanicchia <cosma...@gmail.com>:
> @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
>>>

Reply via email to