Keighley, Glenn wrote:

> All,
>  
> I have two applications "A" and "B"
>  
> A is launched by an alarm and presents a UI to the user. When the user
> selects a button in A it triggers an application launch to application
> B using SysUIAppSwitch. When the user is done with application B he
> can select a button to re-launch application A with SysUIAppSwitch.
> When the user is done with application A he can select a button to
> cause the application to exit. Note that the button selected to cause
> the application to exit is not the "Home" key but something provided
> within the application.
>  
> Application A exits its event loop exits but rather than being
> returned to the Palm launcher as one would expect the system actually
> relaunches application B.
>  
> So my question is why is this happening and what is going on here? Why
> does the system relaunch the previous application rather
> than reverting to the launcher. Is a reference to the previous
> application stored somewhere and if so is it possible to edit this
> value? FYI I know that I can force a launch to the Palm launcher by
> putting in explicit code to do this but I'm trying to avoid having
> to do that.

This is the reason why most Palm apps don't have an "exit" button.  The
normal process is to never 'exit' an app, but rather to launch a
different app.  Once the command to launch another app is given, then
the current app cleans itself up and allows the launch to happen.  And
by 'another app' I'm also talking about the laucher app, which is just
an app like all the others.  Without specifically launching an app
first, the behaviour of the first app upon exiting can be a little
undefined.  You've found that it is returning you to the previously
launched app, but I don't know that that would always be the case.  Bob

-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to