david850067064 / as3flexunitlib

Automatically exported from code.google.com/p/as3flexunitlib
0 stars 0 forks source link

addAsynch does not handle callbacks of any parameters #14

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
currently it only proxies callbacks with one parameter. 

Would be nice it could track any asynchronous callbacks.

The following changes seem to work for me:

in the AsyncTestHelper.runNext()

use this code:

          if (extraData != null)
            {
                //func(objToPass, extraData);
                objToPass.push(extraData);
                func.apply(testCase, objToPass);
            }
            else
            {
                func.apply(testCase, objToPass);
            }
            func = null;
            objToPass = null;
            extraData = null;
        }

update the handleEvent() signature to:

  public function handleEvent(...event) : void

And they seem to do the trick. 

Original issue reported on code.google.com by bing....@gmail.com on 7 Apr 2008 at 9:26