ArgumentError: Error #1063: Argument count mismatch Expected 0, got 1.

I received this error when an event handler I created did not contain an expected parameter. Somehow the compiler missed it but an error was thrown in the browser. The fix was easy. I forgot to add in the event object. Adding that in fixed the problem.
  
  
directorySearch_txt.addEventListener(FocusEvent.FOCUS_OUT, directoryFocusOut);
      // this line generated no errors in flex but generated errors at run time
      public function directoryFocusOut():void {
           // do something   
      }
      // adding the event object cleared the error
      public function directoryFocusOut(event:FocusEvent):void {
           // do something   
      }


你可能感兴趣的:(Flex)