Hi, I'm doing a small app which loads a list of songs from an XML
and display it in a list. I'm using a TileList with a custom
renderer to render the songs. Because I want to keep track which
song has loaded I put a trace comment on the creation event. This
all works as intended, the song list has 2 items and 2 item are
displayed on screen. But I get 3 traces. It seems that the TileList
creates 3 objects but only shows 2.
Any suggestions on how to make sure it only loads 2 objects? It
seems like the first item in the XML list is created twice :(
Source code below:
Song1.xml
-------------------------
<?xml version="1.0" encoding="UTF-8"?>
<song>
<track>
<name>We are broken</name>
<url>../Paramore - We Are Broken.mp3</url>
</track>
<track>
<name>Pressure</name>
<url>../Paramore - Pressure (Acoustic).mp3</url>
</track>
</song>
-------------------------
renderer.mxml
-------------------------
<?xml version="1.0" encoding="utf-8"?>
<mx:Label xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="trace('new song ' + data.name)"
text="{data.name}"/>
-------------------------
test.mxml
-------------------------
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" creationComplete="SongServ.send()">
<mx:HTTPService id="SongServ" url="../Song1.xml" />
<mx:TileList direction="vertical" itemRenderer="renderer"
dataProvider="{SongServ.lastResult.song.track}" left="10" top="10"
right="10" height="200"/>
</mx:Application>
-------------------------