0 Replies Latest reply on Dec 3, 2008 3:04 PM by AbleLink

    Popup parenting issues in multi window

    AbleLink
      I have a multi-window AIR application - there is one base application window, but we currently hide that and use mx:Window for all of our application windows. The application allows you to open new windows to enable easy drag and drop between different areas of content in the app. We use the addPopup method to display a custom editor control when working a specific content item. That means that you could have multiple windows open and each one displaying it's own popup to edit an item that the user if viewing in the window. 60% or so of the time, the popups work fine and parent to the proper window, but the other 40% of the time, the popup will parent to a different window. (I can post a link to a screencast demonstrating the behavior).

      The custom editor class has the following method, this is called to bring up the editor window. We cache these editors, following the advice for memory management by Sean Christmann and others.

      public function showOnView(view:UIComponent, mobj:*):void {
      PopUpManager.addPopUp(this, view as DisplayObject, true);

      PopUpManager.centerPopUp(this);
      callLater(_finishShowOnView, [view, mobj]);
      }

      The _finishShowOnView method makes sure the instance of the editor is pointing to right model object. None of that touches the parent of the popup though.

      Anyone have any thoughts?

      - Brian