|
Mailing Lists
|
Home /
Groups /
Adobe Flex
Detecting if Window is already open in Air
-----BEGIN PGP SIGNED MESSAGE-----Graham Pearson 03/08/09 08:50 A If you're naming the window, then you should just be able to check if thatAndy Matthews 03/09/09 07:45 A -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Group: I am working on creating an update procedure for one of my Air applications. In the application if it detects a newer version, I open up a Window Component by the following code: var askToUpdateApplicationWindow:AskToPerformUpdate = new AskToPerformUpdate(); askToUpdateApplicationWindow.title = "We Are Closed Today Media Application"; askToUpdateApplicationWindow.currentApplicationVersionNumber = currentApplicationVersionNumber; askToUpdateApplicationWindow.newApplicationVersionNumber = newApplicationVersionNumber; askToUpdateApplicationWindow.ServerName = ServerName; askToUpdateApplicationWindow.newApplicationFileName = newApplicationFileName; askToUpdateApplicationWindow.open(true); Now if the end user does not click on one of the two buttons in this component, how can I go about checking to see if this window is already open on the screen. Right now if the component window is open the next time it checks to see if an update exists then I get 2 windows and I do not want that. I am wanting to bypass the update if the window is currently open. When I debug, askToUpdateApplicationWindow is always null from what I can tell. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (MingW32) Comment: GnuPT 2.6.2.1 by EQUIPMENTE.DE Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJs9tr3GqPAgBSy90RAryCAJ9nUhov1GZOB3+HkQpDhdkGkwBWcgCgief7 2qsXF0JyS+F4RUFCkFmW0Ck= =Q6Dj -----END PGP SIGNATURE----- If you're naming the window, then you should just be able to check if that "name" already exists. Something like: if (!name) { // do something } -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Group: I am working on creating an update procedure for one of my Air applications. In the application if it detects a newer version, I open up a Window Component by the following code: var askToUpdateApplicationWindow:AskToPerformUpdate = new AskToPerformUpdate(); askToUpdateApplicationWindow.title = "We Are Closed Today Media Application"; askToUpdateApplicationWindow.currentApplicationVersionNumber = currentApplicationVersionNumber; askToUpdateApplicationWindow.newApplicationVersionNumber = newApplicationVersionNumber; askToUpdateApplicationWindow.ServerName = ServerName; askToUpdateApplicationWindow.newApplicationFileName = newApplicationFileName; askToUpdateApplicationWindow.open(true); Now if the end user does not click on one of the two buttons in this component, how can I go about checking to see if this window is already open on the screen. Right now if the component window is open the next time it checks to see if an update exists then I get 2 windows and I do not want that. I am wanting to bypass the update if the window is currently open. When I debug, askToUpdateApplicationWindow is always null from what I can tell. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (MingW32) Comment: GnuPT 2.6.2.1 by EQUIPMENTE.DE Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJs9tr3GqPAgBSy90RAryCAJ9nUhov1GZOB3+HkQpDhdkGkwBWcgCgief7 2qsXF0JyS+F4RUFCkFmW0Ck= =Q6Dj -----END PGP SIGNATURE-----
|
May 25, 2012
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||