我有以下功能:
public function rawFlexClickDataGridItem(datagridId:String, colIndex:String, itemText:String):String
{
var child:Object = appTreeParser.getElement(datagridId);
if(child == null)
{
return ErrorMessages.getError(ErrorMessages.ERROR_ELEMENT_NOT_FOUND, [datagridId]);
}
// Assumes the DataGrid has only one ListBaseContentHolder
var dgContentList:Object = Tools.getChildrenOfTypeFromContainer(child,
ReferenceData.LISTBASECONTENTHOLDER_DESCRIPTION)[0];
for each (var array:Array in dgContentList.listItems)
{
var item:Object = array[int(colIndex)];
if(item.hasOwnProperty("numChildren"))
{
for(var i:int = 0;i < item.numChildren;i++)
{
if((item.getChildAt(i).hasOwnProperty("text") && (item.getChildAt(i).text == itemText)) ||
(item.getChildAt(i).hasOwnProperty("label") && (item.getChildAt(i).label == itemText)))
{
return String(item.getChildAt(i).dispatchEvent(new MouseEvent(MouseEvent.CLICK)));
}
}
}
if((item.hasOwnProperty("text") && (item.text == itemText)) ||
(item.hasOwnProperty("label") && (item.label == itemText)))
{
return String(item.getChildAt(i).dispatchEvent(new MouseEvent(MouseEvent.CLICK)));
}
}
return ErrorMessages.getError(ErrorMessages.ERROR_TEXT_NOT_FOUND, [itemText,colIndex]);
}
}
}
当我通过提供(dataGrid,1,黄色)作为参数从javascript调用它时,我收到错误#1069
我的datGrid如下: