Hi all -

I'm trying to work around an issue that I am having with a custom combo-box.  It seems that it is setting the value to empty string (i.e. ""), when it should be null, which is then seen as a difference in the dataGrid itemEditEnd event, and so it tries to cast the "" String to the class type used for display in the ComboBox.

It looks like it comes down to this function in ComboBase.  value in this case is "", where as it is initialized as null.  I'm trying to find out where value gets set to "", but it looks like it must be in the Sprite code, because I can't seem to find any other setters.  Does this code make sense?  Should it be setting the _selectedItem to 'data' rather than to 'value'...

    private function setSelectedItem(data:Object, clearFirst:Boolean = true):void
    {
        //2 code paths: one for before collection, one after
        if (!collection || collection.length == 0)
        {
            _selectedItem = value;
            selectedItemChanged = true;
            invalidateDisplayList();
            return;
        }
        ...
    }


Thanks much for any help.
-Scott
__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to