3 Replies Latest reply on Jun 24, 2008 4:27 PM by fragerdaz

    No access to Repeater on click event

    fragerdaz
      I can't access the repeater on a click event.

      Here's the error I get:
      - In "Variables -> this.repEmail.dataProvider" : ArrayCollection with a@a.com and b@b.com (as it should be)
      - In "Variables -> this.repEmail.currentIndex" : <Exception thrown by getter> (what the?!)
      - In "Debug" : Main Thread (Suspended: Error: Repeater is not executing.)
      mx.core::Repeater/get currentIndex
      components::MyForm/___MyForm_Button3_click
      (again... what the?!)


      Here's my code...
      quote:

      <mx:Script>
      <![CDATA[
      [Bindable]
      private var aEmails:Array = ["a@a.com", "b@b.com"];
      ]]>
      </mx:Script>

      <mx:Repeater id="repEmail" dataProvider="{aEmails}">

      <mx:Text text="{repEmail.currentItem}"/>
      <mx:Button label="Remove" click="repEmail.removeChildAt(repEmail.currentIndex)"/>

      </mx:Repeater>



      TIA !!!