4 Replies Latest reply on Dec 2, 2009 7:38 AM by Guddie

    Strange error with Tooltips and TitleWindow

    Guddie

      I'm developing an application with TitleWindows that are created using the PopUpManager so they can be dragged. Buttons on a ButtonBar display them. After some testing, I found out that the error below is triggered when I am displaying the TitleWindow for the third time (not first or second, but only third) and I try to retrieve the ToolTip from either the Button on the ButtonBar or the TabNavigator in the TitleWindow (by hovering the mouse over these components).

      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()

      Also, when I try clicking the Button to display the TitleWindow for the fourth time and I'm faster than the ToolTip to avoid the error, I get this error:

      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()

       

      I have a FloatingWindow class (attached) which extends TitleWindow, and then I'm creating a new class called SearchWindow which extends the FloatingWindow. The ButtonBar is in a class that extends HBox. The ButtonBar has the following function to display the SearchWindow:

      function searchButton_click(event:MouseEvent):void
                  {
                      //Show Search Window
                      if (searchWindow.removed == true)
                      {
                          searchWindow.map = _map;
                          searchWindow.webService = wsGetData;
                          searchWindow.show(30);
                      }
                     
                  }

       

      The pattern of this error is strange. Why just on the 3rd time do I get the error with the ToolTip and 4th time with the Poping up the TitleWindow? Any ideas would be greatly appreciated.