The label's not the problem, it's selecting the item when it's null. I found 
that it works if I replace null with an empty string in the dataProvider, and 
guard against type errors in the code that reads selectedItem.

--- On Tue, 12/15/09, Tracy Spratt <tr...@nts3rd.com> wrote:

From: Tracy Spratt <tr...@nts3rd.com>
Subject: RE: [SPAM] [flexcoders] Can't select null item in ComboBox
To: flexcoders@yahoogroups.com
Date: Tuesday, December 15, 2009, 10:24 AM










        


 
 
















I do not know why the change, but for a
fix, you could use a labelFunction to return an empty string if the item is
null. 

   



Tracy Spratt, 

Lariat Services, development services
available 











From:
flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of 
Dave Glasser

Sent: Tuesday, December 15, 2009
9:47 AM

To: flexcoders@yahoogroups.com

Subject: [SPAM] [flexcoders] Can't
select null item in ComboBox 



   

   







I have
some code that was originally written under Flex 2, where a ComboBox's data
provider is an array of objects, with the first element set to null. When this
code is built under Flex 2, I can select the first item in the combo's dropdown
list, and selectedItem returns null, which is what I expect and want. When the
code is built under Flex 3, I can't select the null item. It's shown in the
list, but mousing over it doesn't highlight it, and clicking it doesn't close
the dropdown.



Is this a bug, or a new "feature" in Flex 3? 





 















    
    







 


Reply via email to