5 Replies Latest reply on Feb 26, 2013 9:16 AM by Shongrunden

    adding a itemRenderer to a spark list using action script

    home_aidan Level 1

      Hi guys,

      Im adding a spark list using action script.

      ...IM a bit a new to flex, I want to add an image to an item within the list, Should I be using a ItemRenderer component for this?

      If so, once created Im having trouble adding it with action script..

       

      my code looks like this...

       

      var list:List = new List();

      list.dataProvider = collection;

       

      I have tried...

      list.itemRenderer = "views.ItemRend"

       

      and...

      list.itemRenderer = ItemRend

       

      But I get the same error...

      1067: Implicit coercion of a value of type String to an unrelated type mx.core:IFactory. InputBox.as /RegSpotter/src/com line 68 Flex Problem

       

      or..

      1067: Implicit coercion of a value of type Class to an unrelated type mx.core:IFactory. InputBox.as /RegSpotter/src/com line 68 Flex Problem

       

       

      Thanks

        Aidan