从Flex中的模态弹出窗口打开模态弹出窗口?

时间:2014-12-03 21:27:09

标签: actionscript-3 flex actionscript modal-dialog flex4

是否可以从模态弹出窗口打开模态弹出窗口?我无法通过从打开的模式弹出窗口调用showDataEntry()来获得以下工作:

// at the top of the modal's mxml, inside <mx:TitleWindow>
import mx.managers.PopUpManager;
import views.windows.MyDataEntry;

...

private function showDataEntry():void {
    var myDataEntry:MyDataEntry = MyDataEntry(PopUpManager.createPopUp(this,MyDataEntry,true));
    PopUpManager.centerPopUp(myDataEntry);
}

...

<mx:Button id="btnDataEntry" label="Data Entry" click="showDataEntry();" />

1 个答案:

答案 0 :(得分:1)

如果不确切知道MyDataEntry的作用,看起来可能就是问题了。尝试创建弹出窗口并传递一个类来创建内容。

var myDataEntry:MyDataEntry = PopUpManager.createPopUp(this,myDataEntry,true) as MyDataEntry;