Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/apache-flex/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Actionscript 3 自定义外部itemRenderer正在从dataProvider接收空对象_Actionscript 3_Apache Flex_Null_Flex3_Itemrenderer - Fatal编程技术网

Actionscript 3 自定义外部itemRenderer正在从dataProvider接收空对象

Actionscript 3 自定义外部itemRenderer正在从dataProvider接收空对象,actionscript-3,apache-flex,null,flex3,itemrenderer,Actionscript 3,Apache Flex,Null,Flex3,Itemrenderer,我有一个自定义的外部itemRenderer,用于在mx:列表中显示项目。dataProvider是一个数组,每个元素包含4个属性。事实上,似乎itemRenderer正在获取数组,因为它显示4个项目(数组中的项目数量),但这些项目显示为“[object]” 这是我的物品。。。 如果需要更多信息来评估问题,请让我知道更改itemrenderer中的下一行 <mx:Text id="text" width="85%" text="{data}" fontThickness="5" clic

我有一个自定义的外部itemRenderer,用于在mx:列表中显示项目。dataProvider是一个数组,每个元素包含4个属性。事实上,似乎itemRenderer正在获取数组,因为它显示4个项目(数组中的项目数量),但这些项目显示为“[object]”

这是我的物品。。。


如果需要更多信息来评估问题,请让我知道

更改itemrenderer中的下一行

<mx:Text id="text" width="85%" text="{data}" fontThickness="5" click="text_clickHandler()"/>

应该像

<mx:Text id="text" width="85%" text="{data.labelfieldname}" fontThickness="5" click="text_clickHandler()"/>


希望这有帮助。

顺便说一句,这是我的数组…[Bindable]public var xmlsimplarray:Array;
private function listInitializer():void{
            //list_of_projects_master.dataProvider = xmlSimpleArray;
            list_of_projects_master.itemRenderer = new ClassFactory(ProjectListRenderer);
            list_of_projects_master.addEventListener(RemoveEntryEvent.REMOVE_PROJECT, updateXML);
        }
<mx:Text id="text" width="85%" text="{data}" fontThickness="5" click="text_clickHandler()"/>
<mx:Text id="text" width="85%" text="{data.labelfieldname}" fontThickness="5" click="text_clickHandler()"/>