dimanche 19 février 2017

Getting error #1069 when trying to call a function from actionScript?

I've a following function as:

 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]);
    }
}

}

when I'm calling it from the javascript with providing (dataGrid,1,yellow) as arguments, I'm getting error #1069

My datGrid is as below:

enter image description here

Aucun commentaire:

Enregistrer un commentaire