1 Reply Latest reply on Jun 21, 2013 4:54 AM by lomorgan

    Communication between two extensions of a bundle

    mister_west

      Hi,

       

      I'm using extension builder 3.4 SDK with Flash Builder 4.6 on Mac.

       

      I have 2 extensions in my bundle which are correctly created. The first has a model and a data i need for my second.

       

      Is exist a way to call the first extension  in the second and get the desired data? I'm searching a way to communicate between 2 extensions of a same bundle. i'm thinking about create my owns events..  How about existing methods in the SDK?

       

      Thanks 

        • 1. Re: Communication between two extensions of a bundle
          lomorgan Adobe Employee

          A solution which has worked for me in the past is to communicate via CSXS events - your first extension would register a listener for certain event types, and your second extension would dispatch events with that same type. Something like:

           

          // Extension A:

          CSXSInterface.getInstance().addEventListener(B_TO_A_EVENT, myEventHandler);

           

          // Extension B:

          CSXSInterface.getInstance().dispatchEvent(B_TO_A_EVENT, myCSXSEvent);

           

          If you need two way communication then you can additionally add an event listener in Extension B and dispatch from Extension A.

           

          Hope that helps!

           

          --Louis