我正在开发一个应用程序,其标题窗口是使用PopUpManager创建的,因此可以拖动它们。按钮栏上的按钮显示它们。经过一些测试,我发现下面的错误是在我第三次(不是第一次或第二次,而是第三次)显示TitleWindow时触发的,我尝试从ButtonBar上的按钮或TitleWindow中的TabNavigator(通过将鼠标悬停在这些组件上)检索工具提示。
RangeError: Error #2006: The supplied index is out of bounds.
at flash.display::DisplayObjectContainer/addChildAt()
at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::rawChildren_addChildAt()
at mx.managers::SystemChildrenList/addChild()
at mx.managers::SystemManager/addChildToSandboxRoot()
at mx.managers::ToolTipManagerImpl/http://www.adobe.com/2006/flex/mx/internal::createTip()
at mx.managers::ToolTipManagerImpl/http://www.adobe.com/2006/flex/mx/internal::showTimer_timerHandler()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
此外,当我第四次尝试单击按钮以显示标题窗口时,我比工具提示更快地避免了错误,我得到了以下错误:
RangeError: Error #2006: The supplied index is out of bounds.
at flash.display::DisplayObjectContainer/addChildAt()
at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::rawChildren_addChildAt()
at mx.managers::SystemManager/addChild()
at mx.managers::PopUpManagerImpl/addPopUp()
at mx.managers::PopUpManager$/addPopUp()
at assets.components::FloatingWindow/show()
at MethodInfo-1879()
我有一个FloatingWindow类(附件),它扩展了TitleWindow,然后我创建了一个名为SearchWindow的新类,它扩展了FloatingWindow。ButtonBar位于扩展HBox的类中。按钮栏具有以下功能来显示搜索窗口:
function searchButton_click(event:MouseEvent):void
{
//Show Search Window
if (searchWindow.removed == true)
{
searchWindow.map = _map;
searchWindow.webService = wsGetData;
searchWindow.show(30);
}
}
这种错误的模式很奇怪。为什么仅仅在第三次出现工具提示错误,第四次出现标题窗口错误?问题的一部分可能是我的课堂跳跃吗?我有一个自定义ButtonBar类,其中创建了SearchWindow,这是一个基于另一个自定义类(FloatingWindow)的自定义类,它基于TitleWindow。这可能是问题的原因吗?
非常感谢您的帮助。