Hi,

When the Palm is switched on, my program is started and depending on
whether the Palm has been switched on via a "standard" button or the
hotsync button, it does something or not. My code looks like

 // if we were switched on due to an alarm or the hotsync-button
 // and if the corresponding options is set, don�t do anything      
 if (  (   (KeyCurrentState() == 0x0)
        || (KeyCurrentState() & keyBitCradle))  && 
(prefs->hotsync))
    return;
 else
    // do something

Now I test it with the emulator and an 3.5 ROM (Palm V). I switch it
off, switch it on, okay. I repeat the whole stuff several times, and
it works - most of the time. Now, sometimes it does not work!
Sometimes these three lines do not recognize that the Palm was
switched on using the PowerButton. 

Is this a problem of the emulator (maybe that keyBitCradle is set,
although I haven�t pressed it?) or is my whole idea wrong? Can I use
KeyCurrentState for this purpose or is there some better way to find
out how the Palm was switched on.

P.S.: I posted another article some days ago and nobody answered. I
am not sure whether that�s been because no one knew the answer or
whether the article was never arrived. Could somebody please reply
now? Thanks so much!!

-- 
 Tschau,            ICQ 28589118                   PGP-Key available
      Daniel        [EMAIL PROTECTED]
                    http://www.dseifert.de/        Berlin, Germany

-- 
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