Sign in with
Sign up | Sign in

Closing a program

Last response: in Cell Phones & Smartphones
Share

Archived from groups: comp.sys.palmtops.pilot (More info?)

coz1978@gmail.com wrote:
>
> This should be a fairly simple question to answer. Is there any way I
> can close my palm app? If so, how? AppStop() gives me errors...
> thanks in advance

Hit the "Home" button.

Notan

Archived from groups: comp.sys.palmtops.pilot (More info?)

Notan wrote:
>
> coz1978@gmail.com wrote:
> >
> > This should be a fairly simple question to answer. Is there any way I
> > can close my palm app? If so, how? AppStop() gives me errors...
> > thanks in advance
>
> Hit the "Home" button.

I re-read your question... Are you trying to terminate a program
that you're writing?

Notan

Archived from groups: comp.sys.palmtops.pilot (More info?)

coz1978@gmail.com wrote:
> This should be a fairly simple question to answer. Is there any way I
> can close my palm app? If so, how?

Return from PilotMain(). That's the only condition under which your
app can ever stop (barring a crash).

Often it's safest and easiest to enqueue an appStopEvent for
yourself. That way whatever is already in the queue will get processed
(by your own event loop) before the event loop quits due to seeing
an appStopEvent.

So, that would look something like this:

EventType stopevent;

MemSet (& stopevent, sizeof (EventType), 0);
stopevent.eType = appStopEvent;
EvtAddEventToQueue (& stopevent);

Another thing you can do is use SysUIAppSwitch() to switch to
another app, but that's only appropriate if you know which
other app you wish to switch to.

- Logan
Ask the community
!