2011-01-20 47 views
0

獲取事件對象當我添加SequenceWaiter步入SequenceRunner,我怎樣才能得到事件對象至極傳遞到事件?有一個從我的測試函數的代碼:從SequenceWaiter

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

我不確定你能做到。你有沒有試過問FlexUnit論壇? – 2011-01-21 16:57:02

回答

0

回答了flexunit forum。基本思想是擴展SequenceWaiter類,覆蓋setupListeners函數以設置附加事件偵聽器並將事件對象保存到此偵聽器中的公共字段。