try making a call to SysUIAppSwitch. it changes the system global that
state what is the next app to be launched. if you do not do it, it
will keep being your app.
On 9/2/06, P REEDER <[EMAIL PROTECTED]> wrote:
I have a simple app which just launches the Network preferences panel. (so I
don't have to launch Preference and switch to the Network panel).
UInt32 PilotMain(UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags) {
Err err = errNone;
switch (cmd) {
case sysAppLaunchCmdNormalLaunch:
LaunchNetPrefsPanel();
break;
case sysAppLaunchCmdReturnFromPanel:
break;
default:
break;
}
return(err);
}
LaunchNetPrefsPanel uses the method shown in PalmSource Knowledge Base Answer
ID 294.
When the network panel is exited with its "Done" button, my app gets relaunched
with the sysAppLaunchCmdReturnFromPanel launch code. At this point, all I want to do is
exit. However, the system then relaunches my app with sysAppLaunchCmdNormal (which
relaunches the panel).
At http://www.palmoswerks.com/discuss/msgReader$153, Ben Combee states
When the panel exits, the original app is restarted with a
sysAppLaunchCmdReturnFromPanel launch code. If the application doesn't handle
this launch code, the OS will again startup the app, this time using a
sysAppLaunchNormal code.
How can my application signal that is has handled the
sysAppLaunchCmdReturnFromPanel launch code?
Returning a non-zero value doesn't do it. Calling EvtGetEvent doesn't do it.
Displaying an alert doesn't do it. Putting an appStopEvent in the queue and
retrieving with EvtGetEvent doesn't do it, even when I give SysHandleEvent a
chance to handle it.
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
--
Best Regards, Dmitry Grinberg
Software Engineer, http://PalmPowerups.com
(847) 226 9295
AIM: DmitryGrinberg
MSN: [EMAIL PROTECTED]
ICQ: 165589894
Y! IM: dmitrygr2003
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/