This content has been marked as final. Show 8 replies
I don't think there's a property or method which indicates what you need, but you could do it on you own. Just declare a boolean variable in your application whose value will depend on the value you pass to the addPopUp and createPopUp methods. So if you set your PopUp to be modal then set your global boolean variable to true and so.
Hope this helps
So I'll have to remember to update the value in every place I put up a dialog and also in every place I remove them. Not optimal. This seems like a pretty large hole in the framework. Oh well, thanks anyway.
You could do the following too:
Extend the PopUpManager class and add a boolean variable. Then "override" the createPopUp and addPopUp methods so they update the boolean value for you, then call the superclass addPopUp and createPopUp methods. Finally add a method to check the value of your boolean status.
What do you think? It is a lot cleaner and helps you solve your problem
That's much better. Still seems like something the framework oughta provide. :)
Yep you got a big point there :P maybe you should send your request to the Adobe Team, i think there's an URL for requesting functionality, give it a shot maybe they will include it in time for the Flex 3 release.
Glad to help, don't forget to mark this topic as closed by marking a post as the answer :)
As an alternative, take a look at the SystemManager class.
It's got crazy methods like:
From the help docs:
The SystemManager maintains multiple lists of children, one each for tooltips, cursors, popup windows. This is how it ensures that popup windows "float" above the main application windows and that tooltips "float" above that and cursors above that. If you simply examine the numChildren property or call the getChildAt() method on the SystemManager, you are accessing the main application window and any other windows that aren't popped up. To get the list of all windows, including popups, tooltips and cursors, use the rawChildren property.
Hope that helps too.
Awesome mae@ccg!!! That's exactly what Glen needs
I had no idea that class hold the answer for this, thanks for sharing you knowledge
Yep, that should do it. Seems like PopupManager oughta have a method for finding out if there's a modal popup up, but …