2 Replies Latest reply on Mar 8, 2010 12:04 PM by GeorgeWS

    Event for component

    GeorgeWS Level 1

      I have a combobox in my Main. I want to change the combobox and the component fires a send() to fill its self with data. How do you trigger something in a child component from the Main?

       

      Thanks

      George

        • 1. Re: Event for component
          Sam Souhrada Level 1

          Can you post sample code?

           

          If the component has an ID... You could simply do mycompID.myFunction()

          • 2. Re: Event for component
            GeorgeWS Level 1

            when my cobmobox in the Main changes this gets fired:

             

            public function onChange(oEvent:Event):void{

            if(oEvent.target.selectedItem.data == null) {

            Supplier.includeInLayout = false;

            viewStack.includeInLayout = true;

            }else{

            SupplierID = theSuppliers.selectedItem.data;

             

            RACContent.initVars();

             

            Supplier.includeInLayout = true;

            viewStack.includeInLayout = false;

            }

             

            The RACContent is the component name