Skip navigation
jeff.schertzer
Currently Being Moderated

FlexGlobals.topLevelApplication can I retain this...

Apr 25, 2012 12:03 PM

Hello,

 

I currently have an windowed application .mxml (call it Main) that loads another .mxml (call it Sub) in a container.  When an event fires in the Sub program, the event listener in Main is triggered.  So I have my event listener call a function in Main.  This all works great.  The problem seems to be that the FlexGlobals.topLevelApplication isn't Main at this point.  It seems to have changed?  Maybe because it has loaded Sub.mxml.

 

 

The problem i'm having is that when i'm in the function in Main, I want to close() the entire Air application, and restart it.  the closing part works great, it just never restarts.  Here is the code i'm using to Close then restart:

 

    var mgr:ProductManager = new ProductManager("airappinstaller");

    mgr.launch("-launch "+ topApplication.nativeApplication.applicationID + " " + topApplication.nativeApplication.publisherID);

    topApplication.close();

 

Any ideas why topApplication.nativeApplication  wouldn't restart?

 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points