2 Replies Latest reply on Sep 28, 2011 8:47 AM by istrasci

    PopUpManager — multiple instances of a TitleWindow opened

    istrasci Level 1

      Setup:  My Flex application is one consisting of several "subapps".  Basically, the main application area is an ApplicationControlBar with buttons for each of the subapps.  The rest of the area is a canvas where the subapps are displayed.  Only one subapp is visible at a time.  When switching between subapps, we do a canvas.removeAllChildren(), then canvas.addChild(subAppSwitchedTo).  It's essentially a manual implementation of a ViewStack (the pros and cons of which are not the topic of this, so refrain from commenting on this).


      Problem:  In one of my subapps (let's say subapp "A"), I have a search function where results are displayed in a TitleWindow that gets popped up.  Workflow is like enter search criteria, click search button, TitleWindow pops up with results (multiple selection datagrid), choose desired result(s), click OK, popup goes away (PopUpManager.removePopUp), and continue working.  This all works fine.  The problem is if I switch to a different subapp (say "B" -- where A gets removeAllChildren()'d and B gets added), then switch back to A and search again, when the results TitleWindow pops open, there will be TWO stacked on top of each other.  If I continue to navigate away and back to A, every time I search, there will be an additional popup in the "stack" of popups (one for each time A gets addChild()'d).


      Has anyone else experienced this?  I'm not sure what to do about it and it's causing a serious usability bug in my application.  Does this ring any bells to anyone?  It's like I somehow need to flush the PopUpManager or something (even though I'm correctly calling removePopUp() to remove the TitleWindow).  Please help!