Doh!, I missed the "AIR". (I know, the fifth word, capitalized and all
that. Mea culpa.)  Maybe someone with some AIR experience else will be
able to help.

 

Tracy

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Aaron Hardy
Sent: Thursday, December 04, 2008 2:22 PM
To: [email protected]
Subject: Re: [flexcoders] Resetting an application's view for new user

 

That's a good idea.  I wonder if there's a way to do something similar
in AIR considering you can't make the AIR executable restart itself
(from what I know...without a bridge like Merapi).  Maybe there's a way
to essentially reload the contents of the AIR app without actually
re-starting the executable?

Thank you very much for your feedback!

Aaron

On Thu, Dec 4, 2008 at 11:15 AM, Tracy Spratt <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote:

Here is what I do:

  public function logOff():void

  {

    var ur:URLRequest = new URLRequest(_sAppUrl);

    navigateToURL(ur,"_self");

  }//logOff

 

_sAppUrl comes from the browser: location.href

 

Tracy

________________________________

From: [email protected] <mailto:[email protected]>
[mailto:[email protected] <mailto:[email protected]> ]
On Behalf Of Aaron Hardy
Sent: Wednesday, December 03, 2008 10:32 PM
To: [email protected] <mailto:[email protected]> 
Subject: [flexcoders] Resetting an application's view for new user

 

Hey flexers,

I have a hefty AIR application with many different view combinations, 
forms filled with data, etc. When a user logs out and a different user 
logs in, I need the application to be "reset" so that everything looks 
as though no other user was previously logged in. I've ran into two 
solutions:

1) Reset all the forms, views, etc to their original state when the 
first user logs out. This can be tricky getting everything back to its 
initial state.
2) Make the main view (what would be the main application file in option

#1) a separate component. When the user logs out, let the whole 
component get garbage collected. When the new user logs in, 
reinstantiate the main view to ensure its all in its initial state once 
again. With this option, there's not as much worrying about whether 
you've successfully reset everything since it's a brand new instance. 
However, processing time and memory management may be a new issue to 
deal with.

So, I'm curious, how do you folks go about this in your projects?
Thanks!

Aaron

 

 

Reply via email to