At 12:44 PM -0500 2003/01/30, Matthew Henry wrote:
>I'm sure there's a
>good technical reason why the Palm OS's "Erase All Data" is doing a loop
>that constantly checks for a key down (which sucks up all cpu cycles) rather
>than a blocking call (which would do nothing at all until a key down event
>was received).

Since you're curious (and I'm waiting for a build to complete... :o)

That dialog is presented VERY early in the boot sequence of the device, well before 
the Palm OS starts up. Since it cannot use any of the normal Palm OS event loop 
mechanisms to perform this task, it takes the brute-force approach: initialize the LCD 
hardware, copy the "Erase All Data" message (it's a bitmap) directly from ROM into the 
display buffer, enter a spin loop polling for a key press, etc.

Best Regards,

Jim Schram
PalmSource Inc.
Product Engineering

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

Reply via email to