3 Replies Latest reply on Mar 1, 2010 1:10 PM by BosDog

    using PopUpManager.removePopUp to erase variables

    BosDog Level 1

      i have a window popup using popupmanager that contains a component i created with an autosuggest functionality. this component extends the comobox functionality.


      the problem is that when i use it and it auto-suggests for me... the next time i have the autosuggest popup window open... it will show the last autosuggest box on top of the last one. so say for instance i open the popup the third time... there are 3 autosuggest windows instead of one.


      is there a way to completely erase everything from the last poupwindow with a component so that the next time it opens it will be like it's opening for the first time? PopUpManager.removePopUp still keeps it all in memory.

        • 1. Re: using PopUpManager.removePopUp to erase variables
          Flex harUI Adobe Employee

          Use the profiler to see if there are still old instances in memory and what

          is hanging on to them.

          • 2. Re: using PopUpManager.removePopUp to erase variables
            BosDog Level 1

            i think it has something to do w/ the collectionhandler. when i debug the app and put the breakpoint at the open() line below... i notice it runs over this value as many times as i've had the window open. i really only want it to run over this function and do the open() once though and for the latest opened popup window. the collectioniterator seems to keep growing rather than re-using itself? the override functions and the super syntax is where i'm lost as i don't fully understand it.




            override protected function collectionChangeHandler(event:Event):void




            if (typedText != null){




            //if there is data then we open the dropdown









            • 3. Re: using PopUpManager.removePopUp to erase variables
              BosDog Level 1

              harUI i am using the sample given at this

              website so you can see a working version of what i am doing.


              if you take that example and have the suggest box be part of a popup window using the popupmanager... you will see what i mean when you search, close... re-open and search again (position the popupbox in a different position each time, otherwise the comboxes just overlap one another)