Get event object from SequenceWaiter
When I add SequenceWaiter step into the SequenceRunner, how can I get event object which was passed into the event? There is the code from my test function:
var sequence: SequenceRunner = new SequenceRunner(this);
sequence.addStep(new SequenceCaller(manager, function(): void {
manager.startUpload();
}));
sequence.addStep(new SequenceWaiter(manager, PackageUplo开发者_如何学GoadEvent.BEFORE_PACKAGE_UPLOAD, 1000));
sequence.addStep(new SequenceCaller(manager, function(): void {
// TODO: Get event object from PackageUploadEvent.BEFORE_PACKAGE_UPLOAD event
}));
Answered on flexunit forum. The basic idea is to extend SequenceWaiter
class, override setupListeners
function to set up additional event listener and save event object to the public field in this listener.
精彩评论