假设我有一个名为 myCustomWindow 的 Window 组件。然后我创建新窗口:
var newWindow:myCustomWindow = new myCustomWindow();
newWindow.open();
myCustomWindow 具有名为 myProperty 的公共属性。
如何从 NativeWindow 访问 myCustomWindow?例如,如何在此循环中执行此操作:
for (var i:int = 0; i < NativeApplication.nativeApplication.openedWindows.length; i++)
{
if( NativeApplication.nativeApplication.openedWindows[i].myProperty == 25)
{
NativeApplication.nativeApplication.openedWindows[i].close();
}
//error, cause NativeWindow doesn't have myProperty
//how to access myCustomWindow.myProperty of this NativeWindow ?
}