Actionscript 3 Flex 4/ActionScript 3中ComboBox的方法setSelectedIndex:是否有任何当前文档?
我在Adobe的文档中查阅了多年,但找不到以下方法: setSelectedIndex(值:int,dispatchChangeEvent:Boolean=false,changeCaret:Boolean=true):void 我知道这个函数存在,因为我的代码使用它。我使用的是FlexSDK 4.14.1。当我转到ComboBox.as源文件时,我发现该函数非常好:Actionscript 3 Flex 4/ActionScript 3中ComboBox的方法setSelectedIndex:是否有任何当前文档?,actionscript-3,apache-flex,combobox,actionscript,Actionscript 3,Apache Flex,Combobox,Actionscript,我在Adobe的文档中查阅了多年,但找不到以下方法: setSelectedIndex(值:int,dispatchChangeEvent:Boolean=false,changeCaret:Boolean=true):void 我知道这个函数存在,因为我的代码使用它。我使用的是FlexSDK 4.14.1。当我转到ComboBox.as源文件时,我发现该函数非常好: /** * @copy spark.components.supportClasses.ListBase#setSelect
/**
* @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);
}
我还访问了继承树(DropDownListBase->List->ListBase等),ComboBox从中继承的类都没有关于setSelectedIndex的文档
我能找到的唯一文档是保存在上的旧版本(Flex 4.10)
是否仍然支持setSelectedIndex方法?是否还有其他地方可以查找文档?该版本的Flex来自,Adobe不再维护/开发Flex: setSelectedIndex()方法 重写公共函数setSelectedIndex(值:int,dispatchChangeEvent:Boolean=false,changeCaret:Boolean=true):void rowIndex是包含选定单元格的项的数据提供程序中的索引 参数 value:int—单元格的基于0的行索引 dispatchChangeEvent:Boolean(默认值=false)-如果为true,则如果行索引已更改,组件将调度“更改”事件。否则,它将发送一个“valueCommit”事件 changeCaret:Boolean(默认值=true)-如果为true,插入符号将设置为selectedIndex,作为调用此方法的副作用。如果为false,则caretIndex不会更改 主要切入点