Daniel Seifert wrote:
> schrieb Jay Ts:
> >         newEvent.eType = keyDownEvent;
> >         newEvent.data.keyDown.chr = vchrPowerOff;
> >         newEvent.data.keyDown.modifiers = commandKeyMask;
> >         EvtAddEventToQueue(&newEvent);
> >         /* Won't get here ... but just in case: */
> >         FrmCustomAlert(ErrorAlert,"Power Off failed"," "," ");
> []
> > You may want to comment out the last line; I don't know if it's
> > necessary(?).  
> 
> Actually it should be counter-productive, as the FrmCustomAlert WILL be
> executed. Just adding the event to the queue will not turn the device
> off immediately, the event still has to run through the usual places.
> (Even if it would turn off immediately, the FrmCustomAlert would be
> executed after the device turned back on, after all the app has to
> continue somewhere ;-))

Aha - thanks.  The code I inserted the vchrPowerOff into was originally
used to call the Launcher.  In that case, execution went there.  Looks
like there are better ways to do this.

Jay Ts
-- 
Every child is an artist. The problem is
how to remain an artist once he grows up.
        - Pablo Picasso

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

Reply via email to