From: "Fred Zheng" <[EMAIL PROTECTED]>
> Q2. "SysUIAppSwitch()" works well. But sometimes I need to have the
control
> return to the calling application when finished. So I tries
> "SysAppLaunch()". This is not that pleasant. it always collapses.
>
You are better to stick with SysUIAppSwitch() and return to
the calling app by sending a signal of some sort when you launch
it.  The calling app would identify that it has to return control and
would use SysUIAppSwitch() when it's finished.

There are a variety of ways to send the signal - you could set a
feature or set a value in a shared preference block - but what
worked well for me in a similar situation was to define
custom launch codes.  You then use one of these instead of
sysAppLaunchCmdNormalLaunch when calling
SysUIAppSwitch().  Your app uses the same logic as for a
normal launch, but takes note of anything special it should do
when it's finished (one launch code might be appLaunchReturnToApp1,
for instance).  Alternatively you can use one custom launch code
and pass a command block to the app with the special info in it.

The programmer's companion has several sections that discuss
this and SysUIAppSwitch() also includes some notes.

Chris Tutty


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

Reply via email to