我正在一个小型摄影展上工作。 我创建了一个Xml文档,试图将其与我的清单控制与项目供应商联系起来。 然而,当我试图挽救档案时,我就无法获得未界定的财产“数据”错误。 我认为,我们准备使用“数据”来指目前数据标的浏览量。 我的法典就是这样。
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Declarations>
<fx:Model id="pictureXML" source="data/pictures.xml"/>
<s:ArrayList id="pictureArray" source="{pictureXML.picture}"/>
</fx:Declarations>
<s:List id="pictureGrid" dataProvider="{pictureArray}"
horizontalCenter="0" top="20">
<s:itemRenderer>
<fx:Component>
<s:HGroup>
<mx:Image source="images/big/{data.source}" /> // where the error happen
<s:Label text="{data.caption}"/> // where the error happen
</s:HGroup>
</fx:Component>
</s:itemRenderer>
</s:List>
</s:Application>
My xml
<?xml version="1.0"?>
<album>
<picture>
<source>city1.jpg </source>
<caption>City View 1</caption>
</picture>
<picture>
<source>city2.jpg </source>
<caption>City View 2</caption>
</picture>
<picture>
<source>city3.jpg </source>
<caption>City View 3</caption>
</picture>
<picture>
<source>city4.jpg </source>
<caption>City View 4</caption>
</picture>
<picture>
<source>city5.jpg </source>
<caption>City View 5</caption>
</picture>
<picture>
<source>city6.jpg </source>
<caption>City View 6</caption>
</picture>
<picture>
<source>city7.jpg </source>
<caption>City View 7</caption>
</picture>
<picture>
<source>city8.jpg </source>
<caption>City View 8</caption>
</picture>
<picture>
<source>city9.jpg </source>
<caption>City View 9</caption>
</picture>
<picture>
<source>city10.jpg </source>
<caption>City View 10</caption>
</picture>
</album>
我欣赏任何帮助!