尝试在应用程序中居中时 Pop 出现错误
Hello I am having this error when trying to center my popUp. If I remove the centerPopUp code line, the popUp appears but of course is not centered.
The Error is as such:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at mx.managers::PopUpManagerImpl/centerPopUp()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\PopUpManagerImpl.as:494]
My Code:
var helpWindow:TitleWindow=
PopUpManager.createPopUp(this, screen_Name, true) as TitleWindow;
PopUpManager.centerPopUp(helpWindow);
Can someone address this issue?
Hello I am having this error when trying to center my popUp. If I remove the centerPopUp code line, the popUp appears but of course is not centered.
The Error is as such:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at mx.managers::PopUpManagerImpl/centerPopUp()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\PopUpManagerImpl.as:494]
My Code:
var helpWindow:TitleWindow=
PopUpManager.createPopUp(this, screen_Name, true) as TitleWindow;
PopUpManager.centerPopUp(helpWindow);
Can someone address this issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您想稍后将 panel/titleWindow 居中,您应该将 FlexGlobals.topLevelApplication 作为参数传递给 createpopup。
所以,
我确信这会起作用。
You should be passing the FlexGlobals.topLevelApplication as an argument to createpopup if you want to center your panel/titleWindow later on.
So, here it will be
Im sure this will work.