7 Replies Latest reply on Dec 9, 2010 9:25 AM by r.rubio

    Multi-Version Using Flex 4.1 SDK

    r.rubio Level 1

      Setup

      Flex SDK - 4.1

      -includes=mx.managers.systemClasses.MarshallingSupport

      Player 10.1

       

      I'm trying to try out multi-version support.  My configuration is as follows:

       

      1.  boostrap loader loads a portal (both bootstrap and portal compiled using 4.1)

      2.  portal loads a 3.5 compiled application

       

      I get the following error:

       

      VerifyError: Error #1053: Illegal override of activate in mx.managers.SystemManagerProxy

       

      The portal is loaded as a child of bootstrap as follows:

      swfLoader.loaderContext.applicationDomain = new ApplicationDomain(bootStrapApplicationDomain);

       

      The portal loads the 3.5 application as a child of boostrap as follows:

      swfLoader.loaderContext.applicationDomain = new ApplicationDomain(bootStrapApplicationDomain);

       

      Am i missing a step?

        • 1. Re: Multi-Version Using Flex 4.1 SDK
          r.rubio Level 1

          When i use the logic in SWFLoader to get bootstrap or top level app domain i get null for the ApplicationDomain but it gets farther as the swf file is actually loaded.  But i then get the expected typecoercion errors since it is not loaded as a child of bootstrap.

           

          SWFLoader uses the following logic:

           

          var appDomain:ApplicationDomain = currentDomain.parentDomain;

          var topmostDomain:ApplicationDomain = null;

          while (appDomain)

          {

               topmostDomain = appDomain;

               appDomain = appDomain.parentDomain;

          }

          lc.applicationDomain = new ApplicationDomain(topmostDomain);

           

          As mentioned previously if i use the boostrap application domain i get the error mentioned in previous post:

           

          VerifyError: Error #1053: Illegal override of activate in mx.managers.SystemManagerProxy

           

          Any ideas?

          • 2. Re: Multi-Version Using Flex 4.1 SDK
            joan_lafferty Adobe Employee

            To load the 3.5 Flex SWF into a 4.1 application, you'll need to load it into the SWFLoader and use loadForCompatibility=true. This will load the SWF into its own application domain so that classes don't clash for the different versions. I didn't see that you mentioned using loadForCompatibility.

             

            hope this helps,

             

            Joan

            • 3. Re: Multi-Version Using Flex 4.1 SDK
              r.rubio Level 1

              When you specify loaderContext in SwfLoader loadForCompatibility is ignored.  When i use loadForCompatibility the parent application Domain used is "null" which works but causes type coercion errors for classes that i want to share across the domains.

               

              This problem is suppose to be solved by the bootstraploader but i cannot get it to work on a multi-version configuration.

              • 4. Re: Multi-Version Using Flex 4.1 SDK
                Flex harUI Adobe Employee

                Get a link-report for the bootstrap.  Make sure SystemManagerProxy is not in

                the bootstrap

                • 5. Re: Multi-Version Using Flex 4.1 SDK
                  r.rubio Level 1

                  What would cause it to be included? 

                   

                  I also created vanilla boostrap and portal with only required imports on boostrap but i still get same error when i use boostrap app domain.

                   

                  How do i prevent SystemManagerProxy from being included.

                  • 6. Re: Multi-Version Using Flex 4.1 SDK
                    Flex harUI Adobe Employee

                    The link-report should tell you how it got in there.   Bootstraps may not

                    always be possible.

                    1 person found this helpful
                    • 7. Re: Multi-Version Using Flex 4.1 SDK
                      r.rubio Level 1

                      Thanks.  Got it.  MarshalSupport flag was set in bootstrap and was causing error.  Should only be set in portal application.