I havent tried reloading an air app.. may be you can try the following link:

http://stackoverflow.com/questions/1821749/how-to-restart-a-standalone-adobe-air-flex-application

--- In flexcoders@yahoogroups.com, Nolan Erck <nolan.erck@...> wrote:
>
> (Sorry for the lag in replying, I've been back/forth a lot).
> 
> I should have specified before, this is in an AIR app, so there's no "page"
> to reload. Is there a variation of that function that could be used to from
> within an AIR app?  Something that redoes the FlexEvent.PREINITIALIZE event
> perhaps?
> 
> Thanks for the help.
> 
> -Nolan
> 
> On Thu, Jul 26, 2012 at 2:12 PM, theinvincible83 <abhelaksh@...>wrote:
> 
> > **
> >
> >
> > Nolan,
> >
> > I guess its a binding issue that you are facing. An easy workaround would
> > be to just reload the webpage once the user logs out, you can use the
> > following snippet to reload the page, let me know if that works:
> >
> > private function reloadpage():void
> > {
> > if(ExternalInterface.available)
> > ExternalInterface.call("NavigationControl","stop");
> > var ref:URLRequest = new URLRequest("javascript:location.reload(true)");
> > navigateToURL(ref, "_self");
> >
> > }
> >
> > --- In flexcoders@yahoogroups.com, Nolan Erck <nolan.erck@> wrote:
> > >
> > > Hi All,
> > >
> > > I inherited a Mate app from a previous developer and have been tasked
> > with
> > > fixing a few bugs. I'm new to Mate, I've hit a roadblock, and could use
> > > some help...
> > >
> > > The app I have works about like so:
> > >
> > > 1. User logs in, credentials are verified, standard stuff
> > > 2. The app then queries the server-side database for -only- the records
> > > specific to this user
> > > 3. Records are then saved to the local SQL Lite database for later use
> > > 4. In the MainEventMap file I have code that looks about like so:
> > >
> > > <EventHandlers type="{FlexEvent.PREINITIALIZE}">
> > > <ObjectBuilder generator="{SafetyMeetingManager}"
> > > constructorArguments="{[scope.dispatcher,LOCAL_DB]}" />
> > > <ObjectBuilder generator="{SafetyMeetingDetailManager}"
> > > constructorArguments="{[scope.dispatcher,LOCAL_DB]}" />
> > > <ObjectBuilder generator="{SafetyDrillManager}"
> > > constructorArguments="{[scope.dispatcher,LOCAL_DB]}" />
> > > </EventHandlers>
> > >
> > > <EventHandlers type="{NavigationEvent.CORRECTIVEACTIONLIST}">
> > > <MethodInvoker
> > > generator="{CorrectiveActionManager}"
> > > method="loadList"
> > > arguments="{event}" />
> > > <MethodInvoker
> > > generator="{CorrectiveActionDetailManager}"
> > > method="initDetail" />
> > > </EventHandlers>
> > >
> > > ...you get the idea. That all "works" however, I'm running into a bug
> > when
> > > the first user logs OUT, then a new user logs in. When that 2nd user logs
> > > in, the steps "1 - 4" above should run again, and I should see User #2's
> > > data in the app. While User #2's data is indeed making it into the SQL
> > > Lite database, the screens in the app are still bound to User #1's data!
> > So
> > > it's displaying the wrong information. (If I have the user shut down the
> > > app entirely, then restart it, things work fine.)
> > >
> > > Does that make sense? Anyone have suggestions how to force the screens to
> > > invalidate, and re-bind themselves to the correct data?
> > >
> > > Thanks,
> > > Nolan
> > >
> >
> >  
> >
>

Reply via email to