The 'Philosofy behind the Palm OS' may say that you shouldn't have a
'quit' option in your app, but - dear Palm-fundamentalists - as a
developer you're not always the one who makes that decision AND if you
make an app that should work on different platforms consistency between
platforms can be considered more important than 'the Zen of Palm'.
I would _not_ post an appStopEvent, I tried that and it resulted in
crashes, somehow I'm afraid the resources don't get cleaned up properly.
Instead you could post a keyDownEvent with a launchChr, this way you
simulate someone clicking the 'home' button.
EventType eventToAdd;
MemSet(&eventToAdd, sizeof(eventToAdd), 0);
eventToAdd.eType = keyDownEvent;
eventToAdd.data.keyDown.chr = launchChr;
eventToAdd.data.keyDown.modifiers = commandKeyMask;
EvtAddEventToQueue (&eventToAdd);
Btw, the way Palmsource clings onto their old philosophies may well
prove to be fatal to them. They used to say that applications for PDA's
with the Palm OS should be simple and lightweight. This might have been
right at the time of the first Palm Pilots but in the meantime PDA's got
more memory and consumers expected more from them. Like, for example,
media players. By the time Palmsource realised that, Pocket PC PDA's had
taken over a good share of the PDA market. By the time Palmsource
realised the importance of connectivity for PDA's and smartphones,
Symbian had taken over another big slice. Meanwhile, we developers have
to put up with things like: miniature heaps, no proper file system, no
multithreading. (yeah, yeah, I know. But there are no Cobalt devices,
are there?)
'The Zen of Palm' is all fine and dandy if you're in the luxurious
position in which you develop exclusively for Palm OS and your app isn't
too demanding, resource - wise. But if you have to, say, port some
asynchronous HTTP code to the Palm OS to find it isn't documented
properly anywhere, chances are you value flexibility over the Zen of
Palm...
Anyway, rant over, good luck to all,
Caspar
--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/support/forums/