tags:

views:

22

answers:

1

How to make a custom item renderer in flex 4 without extending the ItemRenderer class?

I need this because I want to use a custom class that is extended in all my components. as this item renderer for me is like a component, i would like to extend that custom class. Thanks ;)

Now im having something like this:

imageList.itemRenderer = new ClassFactory(ThumbView);
imageList.dataProvider = new ArrayCollection([{imageNameString: fileReference.name, imageData: fileReference.data}]);

the ThumbView doesn't extend the ItemRenderer

+1  A: 

For itemRenderers to spark components, implement the IItemRenderer interface and it should work.

www.Flextras.com
Thanks! that is right, but now I found that implement IDataRenderer is just enought. But no indexes.. :s
Totty