Hello!

A user has reported a problem with my software on OS 3.3 (Palm V), which
I could reproduce on a real IIIx with OS 3.3 and on POSE with the 3.3
ROM, emulating a IIIx and a V.
In my software I give special treatment to vchrLowBattery for various
reasons. I was very surprised when I saw that after a short time of
running my app on a OS 3.3 device it received a vchrLowBattery. A while
later it received another one, and so on. The intervals between these
events seem to be random, but not too long (2-10 seconds). I pass these
events to SysHandleEvent, expecting a low battery warning dialog to pop
up, but nothing happens. So essentially my app just sits there, waiting
for the dialog that never showed up to disappear.
The events I receive are keydown events with a code of 257, and a
modifier of 8.
Below is my code. My app runs into the if-condition and pauses.

Any insights? Is usage of WChar a problem on pre-3.5 devices? Can I
safely ignore this virtual key under certain circumstances?

Cheers,
Tilo



EvtGetEvent (&event, presentation->getTimeUntilNextPeriod());

 if ((event.eType == keyDownEvent) && (event.data.keyDown.modifiers &
commandKeyMask))
  {
   WChar chr = event.data.keyDown.chr;

   if (
    chr == vchrAlarm || chr == vchrLock || chr == vchrLowBattery || chr
== vchrBrightness || chr == vchrContrast ||
    chr == vchrHardBrightness || chr == vchrHardContrast
   )
   {
    HostTraceOutputTL2(appErrorClass, "Starter: pause b/c vchr %hu %hu",
chr, event.data.keyDown.modifiers);
    presentation->pause();
   }
}

  if (! SysHandleEvent(&event))
   if (! MenuHandleEvent(0, &event, &error))
    if (! AppHandleEvent(&event))
     FrmDispatchEvent(&event);




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

Reply via email to