7 Replies Latest reply on Dec 14, 2010 3:16 PM by Flex harUI

    ArgumentError: Error #1063: Argument count mismatch on EventListenerRequest()

    r.rubio

      Setup

      - SDK 4.1

      - 10.1 player

      - boostrap application

      - portal application compiled with marshalling support

      - 3.5 application

       

       

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

      1.  bootstrap loads portal

      2.  portal loads a 3.5 application

       

      Both step1 and 2 complete successfully.  However, when i select a button that resides on portal application i get the following error:

       

      Main Thread (Suspended: ArgumentError: Error #1063: Argument count mismatch on mx.events::EventListenerRequest(). Expected 1, got 8.)

      mx.managers.systemClasses::MarshallingSupport/addEventListenerToSandboxes

      mx.managers.systemClasses::MarshallingSupport/addEventListener

      mx.managers.systemClasses::MarshallingSupport/addEventListenerHandler

      flash.events::EventDispatcher/dispatchEventFunction [no source]

      flash.events::EventDispatcher/dispatchEvent [no source]

      mx.managers::SystemManager/addEventListener

      mx.controls::Button/mouseDownHandler

        • 1. Re: ArgumentError: Error #1063: Argument count mismatch on EventListenerRequest()
          Flex harUI Adobe Employee

          Check your configuration.  Maybe the bootstrap contains an

          eventListenerRequest from an older SDK.

          • 2. Re: ArgumentError: Error #1063: Argument count mismatch on EventListenerRequest()
            r.rubio Level 1

            here is my bootstrap code.  could not see any event listener that would cause error.  any other ideas?

             

            public class main extends Sprite {

             

                      public function main() {

                           super();

                 

                 //          if (ApplicationDomain.currentDomain.hasDefinition("mx.core::UIComponent"))

                 //               throw new Error("UIComponent should not be in the bootstrap loader.");

                 /*              if (ApplicationDomain.currentDomain.hasDefinition("mx.core::Singleton"))

                                throw new Error("Signleton should not be in the bootstrap loader.");   */

                      

                           if (stage) {

                                stage.scaleMode = StageScaleMode.NO_SCALE;

                                stage.align = StageAlign.TOP_LEFT;

                           } else {     

                                isStageRoot = false;

                           }     

                           root.loaderInfo.addEventListener(Event.INIT, onInit);

                      }

                 

                      /**

                      * The Loader that loads the main application's SWF file.

                      */

                      private var loader:Loader;

                 

                      /**

                      * Whether the bootstrap loader is at the stage root or not.

                      * It is only the stage root if it was the root

                      * of the first SWF file that was loaded by Flash Player.

                      * Otherwise, it could be a top-level application but not stage root

                      * if it was loaded by some other non-Flex shell or is sandboxed.

                      */

                      private var isStageRoot:Boolean = true;

                 

                      /**

                      * Called when the bootstrap loader's SWF file has been loaded.

                      * Starts loading the application SWF specified by the applicationURL property.

                      */

                      private function onInit(event:Event):void {

                           loader = new Loader();

                           

            addChild(loader);

            loader.load(new URLRequest("/unithru/client/sampleUiPortal.swf"));

             

                           loader.addEventListener(Event.ADDED, resizeHandler );

                           stage.addEventListener(Event.RESIZE, resizeHandler);

                      }

                 

            //          private function bootstrapRootHandler(event:Event):void {

            //               event.preventDefault();

            //          }

            //     

            //          private function stageRootHandler(event:Event):void {

            //               if (!isStageRoot)

            //                    event.preventDefault();

            //          }

            //     

                      private function resizeHandler(event:Event=null):void {

                           if ( loader.content ){

                                Object(loader.content).setActualSize(stage.stageWidth, stage.stageHeight);               

                           }

                      }

                 }

            • 3. Re: ArgumentError: Error #1063: Argument count mismatch on EventListenerRequest()
              Flex harUI Adobe Employee

              The truth is in the link-report for the bootstrap.  Does it have

              EventListenerRequest in it?

              • 4. Re: ArgumentError: Error #1063: Argument count mismatch on EventListenerRequest()
                r.rubio Level 1

                I was able to load a vanilla 3.5 application.  But when i try to load a different application i know get the following error:

                 

                VerifyError: Error #1053: Illegal override of canSkipMeasurement in spark.components.supportClasses.GroupBase.

                The boostrap and portal are the same the only thing different is the application being loaded.  Are there certain classes the loaded application cannot use.

                • 5. Re: ArgumentError: Error #1063: Argument count mismatch on EventListenerRequest()
                  Flex harUI Adobe Employee

                  If the bootstrap contains classes needed by the portal but they are

                  incompatible versions then the bootstrap is not valid.

                  • 6. Re: ArgumentError: Error #1063: Argument count mismatch on EventListenerRequest()
                    r.rubio Level 1

                    ok.  got it work.

                     

                    is there any issue if the loaded 3.5 application uses styles defined in a 3.5 SWF?

                     

                    So the loaded 3.5 application would load a 3.5 SWF that contains style definitions.

                    • 7. Re: ArgumentError: Error #1063: Argument count mismatch on EventListenerRequest()
                      Flex harUI Adobe Employee

                      It depends on what is in the parent applicationdomains.  You should get an

                      error right away if there's a problem.