My code is below.  I'm trying to put an eventListener on the CheckBoxes
(repSL) that are being created with the Repeater.  I get this error:

TypeError: Error #1006: addEventListener is not a function

this works fine with everything but for the repeated checkboxes.  Is
there a differnt way to assign this?

Thanks



<?xml version="1.0"?>
<!-- repeater\myComponents\CustButton.mxml -->
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> " initialize="createListener()"
paddingLeft="5" paddingTop="5" paddingRight="5" paddingBottom="5">

   <mx:Script>
     <![CDATA[
   import mx.events.ListEvent;
   import mx.core.Application;
   import mx.events.ListEvent;
   import flash.events.Event;

       [Bindable]
       public var dpSL:Array=["All","AABS","CBS","TAS","TAX"];
       [Bindable]
       public var dpDI:Array=["Desktop Impact","Network Impact","Local
Help Desk Impact","Other"];
       [Bindable]
       public var dpDO:Array=["All","Global IT","Americas","Central
Europe","Continental Western Europe","NEMIA","Far
East","Oceania","Japan"];
       //
       [Bindable]
       public var dpApp:Array=[{label:"Select One",data:"All"},
              {label:"App Infrastructure",data:"Application
Infrastructure"},
              {label:"Client Conn",data:"Client Connectivity"},
              {label:"Doc Mgmt",data:"Document Management"},
              {label:"Finance",data:"Finance"},
              {label:"People",data:"People"},
              {label:"Q&RM",data:"Q&RM"},
              {label:"SL App Services",data:"Service Line Application
Services"}
              ];
       [Bindable]
       public var dpInfra:Array=[{label:"Select One",data:"All"},
              {label:"Content Mgmt",data:"Content Management"},
              {label:"Data Networking",data:"Data Networking"},
              {label:"Desktop",data:"Desktop"},
              {label:"Identity & Access Mgmt",data:"Identity and Access
Management"},
              {label:"Info Security",data:"Information Security"},
              {label:"Msg and Collab",data:"Messaging and
Collaboration"},
              {label:"Mobility and Comm",data:"Mobility and
Communications"}];
       //
       //
   private function createListener():void {
        repSL.addEventListener(MouseEvent.CLICK, myClickHandler, false,
0);
        infraRB.addEventListener(MouseEvent.CLICK, myClickHandler,false,
0);
        appCB.addEventListener(ListEvent.CHANGE,setFilter,false,0);
        infraCB.addEventListener(ListEvent.CHANGE,setFilter,false,0);
   }
   private function myClickHandler(e:MouseEvent):void {
    trace(e.target.label);
    var myTarget:String = e.target.label;
    if (myTarget == "Application") {
     appCB.enabled = true;
     infraCB.enabled = false;
     infraCB.selectedIndex = 0;
    } else {
     infraCB.enabled = true;
     appCB.enabled = false;
     appCB.selectedIndex = 0;
    }
   }

...

<mx:Tile direction="horizontal" borderStyle="none" width="100%"
horizontalGap="5" verticalGap="5"
   paddingTop="5" paddingBottom="5">
   <mx:Repeater id="rSL" dataProvider="{myACSL}">
     <mx:CheckBox id="repSL" label="{rSL.currentItem}" selected="true"
     
change="Application.application.getRegions(event);Application.applicatio\
n.refresh();" />
   </mx:Repeater>
</mx:Tile>

Reply via email to