views:

404

answers:

1

Basically I want to override some function in the flex/actionscript list class which creates a new ItemRenderer and passes it the required data ready to be displayed. I need to do this because I wish to show a different renderer based on the type of data being displayed. Is there such a function?

I don't really want to pass the list a single itemRenderer which calls its addChild function depending on the type of data it has - It just doesn't seem right...

Thanks.

+2  A: 

You should override public method createItemRenderer(data:Object):IListItemRenderer of ListBase class (and List, which extends ListBase)

Hrundik
OMG! How did I not see that function! I must be going blind. Thanks for your help dude :)
Richie_W