How to access List itemRenderer and its properties (Spark – Flex 4)?
I want to iterate through list and do something like (note it’s pseudo code):
for (var i=0;i<NUMBER_OF_ITEMS_IN_LIST; i++){
myList.getItemRenderer[i].property
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What type of processing do you want to perform on the renderers? I suspect a loop like that will not give you what you need.
Renderers are only created for the elements that you see on the screen. There will not be a renderer for every item in your dataProvider. This is done for performance issue. You should be able to access the List renderers through some property in the API, but it may not be public, or documented. I took a quick look and couldn’t tell.
In the Halo ListBase, there are protected properties named reservedItemRenderers and freeItemRenderers properties. I assume they must be something similar in the Spark List.