当我将SequenceWaiter步骤添加到SequenceRunner中时,如何将事件对象传递给事件?我的测试功能有代码:
var sequence: SequenceRunner = new SequenceRunner(this);
sequence.addStep(new SequenceCaller(manager, function(): void {
manager.startUpload();
}));
sequence.addStep(new SequenceWaiter(manager, PackageUploadEvent.BEFORE_PACKAGE_UPLOAD, 1000));
sequence.addStep(new SequenceCaller(manager, function(): void {
// TODO: Get event object from PackageUploadEvent.BEFORE_PACKAGE_UPLOAD event
}));
答案 0 :(得分:0)
回答flexunit forum。基本思想是扩展SequenceWaiter
类,覆盖setupListeners
函数以设置其他事件侦听器并将事件对象保存到此侦听器中的公共字段。