Hi,
I don't think a boolean flag will help here. The manager will have already
created the instance and the TitleWindow would have to use removePopUp()
which is not optimum.
You need to take that call out of the mxml and create a click handler for
the button.
.. in your app
private var popUpWindow:TitleWindow;
private function button_clickHandler(event:MouseEvent):void
{
if (!popUpWindow)
{
popUpWindow = TitleWindow(PopUpManager.createPopUp(this,main,false));
}
}
....
<mx:Button click="button_clickHandler(event);"/>
Peace, Mike
On 5/31/07, Flexing... <[EMAIL PROTECTED]> wrote:
Store a boolean (flag) in your titlewindow to indicate whether the
Window is already open or not.
On May 31, 2007, at 9:56 AM, Rohan Pinto wrote:
how to i prevent a popup if the popup TileWindow is already Open..
ie: in my conrtol i have
click="PopUpManager.createPopUp(this,main,false);"
if the user clicks this several times, it opens up multiple popups of
the same window. how do i prevent the popup to just 1 instance ?
--
Teoti Graphix
http://www.teotigraphix.com
Blog - Flex2Components
http://www.flex2components.com
You can find more by solving the problem then by 'asking the question'.