1 Reply Latest reply on Mar 19, 2008 6:41 AM by Cacademoniaca

    AddEventListener - specify function parameters?


      the problem.
      I have a class (for example, a dialog, with 1 button - OK)
      I have a method to add event listener to this button. So if the user closed the dialog the method will be called.

      Now if i want to use this class, i need a function which i should to set to my dialog. This function will be called if the user closed the dialog.

      setCallbackFunction( func:Function );

      How to force the user (who use my dialog) to have a function with 2...10 parameters?
      For example my dialog expect that this function will be have 5 parameters. But the user (who use my dialog) provide me a function with 1 parameters.

      The question - safe function parameters. Is it possible somehow?