2014-12-03 258 views
0

是否可以從模態彈出窗口打開模態彈出窗口?我一直沒能得到以下通過一個開放的模式彈出調用showDataEntry()工作:從Flex中的模式彈出窗口打開模式彈出?

// 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();" /> 
+0

你會得到什麼錯誤信息? – Brian 2014-12-04 17:01:10

回答

1

不知道MyDataEntry究竟是幹什麼的,這看起來可能是問題。嘗試創建彈出窗口並將其傳遞給一個類以創建內容。

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