【发布时间】:2012-06-19 16:30:23
【问题描述】:
我有一个从按钮打开的弹出窗口 (selectReasonCode)。该按钮有以下代码
var selectReasonCode:SelectReasonCode = new SelectReasonCode();
selectReasonCode.title = "Reason Codes";
selectReasonCode.showCloseButton = true;
PopUpManager.addPopUp(selectReasonCode, this, true);
PopUpManager.centerPopUp(selectReasonCode);
selectReasonCode.updateReasons(reasonTypeId, rasonCds); //This sets the dataprovider
在选择原因代码屏幕上,我有一个数据网格,其中填充了 updateReasons 方法中设置的值(由上述方法调用。
问题是我的弹出屏幕打开为空。但是如果我在调试模式下在代码中添加一个断点并传递它,屏幕就会打开数据。我相信屏幕会在数据实际设置之前打开。这是真的吗?如果是这样,我如何确保在屏幕打开之前先执行 update Reasons 方法?
要排除调试模式...我在 updateReasons 代码后添加了一行以导致错误。因此首先显示错误,用户单击确定,然后打开弹出窗口。数据随即显示在弹出窗口中。
【问题讨论】:
标签: apache-flex adobe popupwindow