1 Reply Latest reply on Nov 2, 2011 9:53 AM by Flex harUI

    Changing dataprovider to call itemrenderer

    awQQ

      I have list with itemrenderer function. In list I have creation complete event in which I set my dataprovider like:

       

      [Bindable] var myArrayCollection:ArrayCollection;

       

      private function creationComplete(event:FlexEvent):void

      {

           //code

           myList.dataProvider = myArrayCollection;

           //code

      }

       

      and then when I add some item to my myArrayCollection in some other class, shouldn't dataProvider get changed and automatically call itemrenderer?

       

      because at the moment when I use myArrayCollection.addItem(someItem); in different class, item renderer doesn't get called...

      In my understanding it should get called, because I set myArrayCollection as bindable. Should it be like I discribed above?

      or I got the whole picture totally wrong.