Skip navigation
Currently Being Moderated

assigning messageField property on IconItemRenderer using actionscript

Feb 3, 2014 11:14 PM

Tags: #itemrender #iconitemrender #itemrenderer_problem #list_item

I want to assign message field property of IconItemRenderer using actionscript. Initially i did:

 

<s:List id="numberList" width="100%">

     <s:itemRenderer>

          <fx:Component>

               <itemrenderers:IconItemRenderer messageField="number" labelField="label"/>

          </fx:Component>

     </s:itemRenderer>

</s:List>

 

When I tried to set messageField using actionscript like this:

 

(numberList.itemRenderer as IconItemRenderer).messageField = "url";

 

this gave me null exception.

 

What I think here is, itemRenderer property of List provides a Class type instance which can not be typecast into IconItemRenderer. So what is the solution for this.

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points