1 Reply Latest reply on Sep 14, 2010 4:01 AM by rootsounds

    Calling event called in a component but set in another?

    RandomReado Level 1

      I have two components, both called from my main application. I've added an event listener in one of the components, but when I try to dispatch the event in the other component, nothing happens. Can anyone explain why this is please?

        • 1. Re: Calling event called in a component but set in another?
          rootsounds Level 4

          It sounds like you have the following:

          • Component A - has a listener attached for some event.
          • Component B - dispatches the event.

           

          Assuming this is a correct interpretation, it's pretty clear why nothing happens. You have a listen attached to A, but A never fires the event. It is B that fires the event, but you are not listening to it. Attach the listener to B and have the handler function perform whatever operation is desired on A.