Why not just keep a hash of all open windows with references to them. Then
you can check to see if they're open and if so, use the reference to focus
it.

 

!k

 

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Steve Good
Sent: Friday, July 18, 2008 11:32 AM
To: flexcoders
Subject: [flexcoders] Flex 3 / AIR: Checking for a window's existence and if
it has focus

 

Hi all,

 

I've built a very basic chat application with flex 3 and packaged it up in
an AIR app and I'm wanting to refine it a bit.  Currently I can double click
a name in my buddy list and create a new window.  The problem is if the
window already exists and I double click the buddies name again I create
another window.  What I am trying to do is build in the ability for the
buddy list to check if a window has already been created for the selected
buddy, and if it has, bring the window forward and set it's focus.

 

I was playing around with NativeApplication.nativeApplication.openedWindows
but I'm not really sure how I use this, all I did was trace() the object.
Am I on the right track?  If so, then what would be my next step, if not
then how would I check for a windows existence?

 

Thanks!


Steve Good

http://lanctr.com

 





 

 

Reply via email to