I've been looking at Adobe's documentation for the spark ComboBox, but I'm not able to find the method:
setSelectedIndex(value:int, dispatchChangeEvent:Boolean = false, changeCaret:Boolean = true):void
I know this function exists, because my code uses it. I'm using Flex sdk 4.14.1. When I go to the ComboBox.as source file, I find the function well and good:
/**
* @copy spark.components.supportClasses.ListBase#setSelectedIndex()
*
* @langversion 3.0
* @playerversion Flash 11.1
* @playerversion AIR 3.4
* @productversion Flex 4.10
*/
override public function setSelectedIndex(value:int, dispatchChangeEvent:Boolean = false, changeCaret:Boolean = true):void
{
// It is possible that the label display changed but the selection didn't. If this is
// the case, the label has to be updated since the setSelectedIndex code will short-circuit
// and not commit the selection.
// An example is if the label is deleted and then the first item is chosen from the
// dropdown, the selectedIndex is still 0.
if (userTypedIntoText && value == selectedIndex)
updateLabelDisplay();
super.setSelectedIndex(value, dispatchChangeEvent, changeCaret);
}
I also went up the inheritance tree (DropDownListBase -> List -> ListBase etc) and none of the classes that ComboBox inherits from have documentation on setSelectedIndex.
The only documentation I could find was an old version (Flex 4.10) saved on ZengRong's blog.
Is the method setSelectedIndex still supported? Is there anywhere else I could look for documentation?