Hi Alex,
Item renderers aren't really aware of the wider context in which they
are show (i.e. as one item in a collection). They are only concerned
with how to render the particular data object that is passed to them.
If you want to render some kind of index number on the view, your
best bet is probably to incorporate it in the model somehow. That is,
each item in your collection should have an index property which is
set to equal its position in the collection.
Then you can say
<mx:Text text="{data.index}"/>
Cheers,
Lach
On 30/11/2006, at 2:22 AM, Alex wrote:
Hi,
I have an application that uses a custom component as a renderItem in
a TileList, retrieving a list of data from XML as the dataProvider.
How can I retrieve the current index of the item within my custom
component? I can retrieve the data using {data}, but how would I
retrieve the index of the item as it is being added in the actual
TileList?