Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
由于我的一个窗口弹出了一个警报并关闭了,所以我没有要关闭它的警报对象。找到使用 applicationInstance.systemManager.rawchildren 的解决方案。但是我在哪里可以找到 childList 中的警报对象。
这是你想做的一个小蛮力方法。您可以做的只是循环遍历 rawChildren 列表并检查其中一个孩子是否来自 Alert 类型。
for(var i:uint = 0; i < rawChildren.numChildren; i++) { if( rawChildren.getChildAt(i) is Alert ) { //magic goes here } }
如果您的应用程序在一个位置打开警报会更好。表示您传递事件或评论(取决于您的应用程序框架)以显示错误。这样只有一个控制器可以打开/控制警报。