Hi kaal,
Well, fetching all item renderers can be a little tricky since flex
controls tend to re-use an item renderer.
If you see this page
"http://livedocs.adobe.com/flex/3/html/help.html?
content=cellrenderer_7.html"
you can see this -
"Flex might reuse an instance of the item renderer or item editor"
There are some APIs available for ex. in TileList, there r these APIs
-
itemToItemRenderer(item:Object):IListItemRenderer
indexToItemRenderer(index:int):IListItemRenderer
you can iterate over your dataprovider and get their itemrenderers.
I'm not sure if similar APIs exist in other controls too.
Alternatively, You can try to extend the TileList, say customTileList,
and use a protected variable called "visibleData".
Visibledata - A hash table of data provider item renderers currently
in view. The table is indexed by the data provider item's UID and is
used to quickly get the renderer used to display a particular item.
TileList internally uses VisibleData in above listed APIs -
(itemToItemRenderer, indexToItemRenderer).
~Dolly
On Dec 1, 9:40 pm, kaal <[EMAIL PROTECTED]> wrote:
> You didnt understand my question :(
> I can acces the dictionary but what my TileList contains r the
> objects
>
> For eg:
> my itemRenderer is tempItemRenderer which is a mxml component say
> Label and text is {data.label}
> and dataProviderer is ArrayCollection({label:'tempLabel'},
> {label:'tempLabel1'})
>
> now i need the list of all the objects in my tilelist which will b
> list of all objects that Tilelist automatically create for me
> in this case it will
> tempItemRenderer1
> tempItemRenderer2( these may differ for people)
>
> Hope i am clear
>
> On Dec 1, 9:27 pm, "Venkat Viswanathan" <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > You will have to iterate through the dictionary using a "for..in" loop or
> > "for each... in" loop and place an incremental counter to get the number of
> > elements in it.
>
> > Regards,
> > Venkatwww.venkatv.com
>
> > On Mon, Dec 1, 2008 at 8:07 PM, kaal <[EMAIL PROTECTED]> wrote:
>
> > > Hi ,
>
> > > I have a tilelist and it has a dataprovider and itemrenderer, I need
> > > to get the list of all the objects that have been made in tilelist (It
> > > is not dataprovider ; dataprovider is actually is dictionary it is not
> > > an object list)
>
> > > Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---