[EMAIL PROTECTED] wrote:
 I want to process someting( some task ) whenever there is free
time .. i.e. nilEvent. But when I have a focus to my Field on my
form ( cursor keeps blinking ) at that time no nilEvent gets
generated. Is this behaviour is normal? How can I get rid of this?

What timeout are you passing to EvtGetEvent()?  As I recall, you
will only get a nilEvent if the timeout elapses.  If the cursor
is blinking periodically, this could be something that is handled
by an event, and if that event comes frequently enough, then you
would receive no nilEvents because you would never go long enough
without a timeout.

I would do one of two things:
(1) Decrease your timeout, or
(2) Make the timeout zero, which will return a nilEvent immediately
    when the queue becomes empty.  Then, as long as you have work
    units to do in the background do them; when you have finished
    and have no work units, then put the timeout back to something
    larger again.

Of course, as long as you are using a system like Palm OS that does
not provide pre-emptive multitasking to applications, you run the risk
that any such processing will make the system not very responsive to
user inputs.  There are two ways to deal with it: either you only try
to do background processing when it appears that the device is idle,
in which case (if the device is never idle) you may never make progress
on the background processing; or, you make you the processing a higher
priority and live with not being as responsive to the user interface.
As far as I know, there is no way to avoid making this compromise...

  - Logan

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

Reply via email to