Anyone knows how it works Async.asyncHandler(), and if it Async.processOnEvent()can only be used in the [Before] method. (Anyone knows a useful document except http://docs.flexunit.org/ ).
I define an MXML component called HelloCompo (extends Vbox), and the component defines a function called hello (), a client event called HelloEvent is sent to hello () (an event type, only called "hello"), and to another function called init () listened to the event, I want to check if the event was sent correctly. So I have a test:
var helloCompo = new HelloCompo ();
helloCompo.hello();
helloCompo.addEventListener("hello", Async.asyncHandler(this, handleHello, 1000, null, handleTimeOut));
The test will always call the handleTimeOut method (means that HelloEvent has not been sent, but when helloCompo.hello () is excute, it really gets sent, so what's wrong?)
jason source
share