Hi, Ravindra
As you see, cltSelect event itself will be lost.
I am not familiar with your code, but I guess adding
MenuHandleEvent(0, &event, &error);
FrmDispatchEvent(&event);
(where error is UInt16) after SysHandleEvent(...) will do the job.
In my case I wanted the system to look frozen (like with SysTaskDelay)
while traping events under the hood, but you might not wish that.
BTW if you just want to wait for a particular event, you can pass
evtWaitForever
to EvtGetEvent and remove all timer stuff - this is more readable,
more efficient, and less time consuming.
Regards
Michael
-----Original Message-----
From: Ravindra [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 21 November 2001 16:28
To: Palm Developer Forum
Subject: Re: Problem with SysTaskDelay()
Hello Michael ,
Thanx once again.
I used this method instead of SysTaskDelay() ,and pass wakeup event as
ctlSelectEvent since I have to press stop or next buttons ,but still result
is same as previous no event is get fired .
Is I am missing any thing ?
Anything extra has to be done??/
Regards,
Ravindra
----- Original Message -----
From: "Michael Glickman" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Wednesday, November 21, 2001 10:16 AM
Subject: RE: Problem with SysTaskDelay()
> Oops, please remove check for nilEvent, this is a bug.
> I will fix mine as well.
>
>
> -----Original Message-----
> From: Michael Glickman [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 21 November 2001 3:35 PM
> To: Palm Developer Forum
> Subject: RE: Problem with SysTaskDelay()
>
>
> Ok, here is the extract from my code.
> I serves a different purpose, but you can customize it.
>
>
> /////////////
////////////////////
> // Just wasting time before an event or when time is up
> // (a better alternative of SysTaskDelay)
> // N.B. The WakeUp event is "swallowed".
> void SuspendTask(UInt32 timeoutTicks, eventsEnum WakeUpEvent)
> {
> EventType event;
> UInt32 NextTicks;
>
> NextTicks = TimGetTicks()+ timeoutTicks;
>
> for (;;) {
> EvtGetEvent(&event, (Int32) timeoutTicks);
> SysHandleEvent(&event); // No need for other stuff
> if (event.eType == nilEvent || event.eType == WakeUpEvent) break;
> timeoutTicks = TimGetTicks();
> if (timeoutTicks >= NextTicks) break;
>
> timeoutTicks = NextTicks - timeoutTicks;
> }
> }
>
>
> -----Original Message-----
> From: Michael Glickman [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 21 November 2001 3:18 PM
> To: Palm Developer Forum
> Subject: RE: Problem with SysTaskDelay()
>
>
> The problem with SysTaskDelay that it really suspends the whole app
> including event processing that makes is almost absolutely useless.
>
> Instead of that I prever using an event loop which quits when
> the time is up. You process events as usual, but you need
> to re-adjust timeout for EvtGetEvent,and break when timeout
> is negative or zero.
>
> Michael
>
>
>
> -----Original Message-----
> From: Ravindra [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 21 November 2001 3:06 PM
> To: Palm Developer Forum
> Subject: Problem with SysTaskDelay()
>
>
> Hi Everybody,
> Can any body help me to solve my problem.
> In one of mine application I am having string about 10000 character's
,now
> I have to
> display a line of 16 to 30 character's in a text field depending on user
> selected font size.
> Speed of display is also select by user it may be 1-10 lines per second.
>
> I am using
>
> SysTaskDelay(SysTicksPerSecond()/set3)
>
> method here set3 contains value selected by user as no.of lines per second
> for display.
>
> Now problem is user can any time stop display or may be read another
string
> by tapping
> buttons provided .
>
> But since I am using SysTaskDelay() method processor will stay in sleep
mode
> that's why
> it won't respond for any of the event until whole sting is completely
read.
> So can any body tell me how to do this .
> It will be great if send me code snippet .
>
> Thanx in advance
>
> Regards
> Ravi
>
>
> --------------------------------------------------------------
> Nova Software, Mumbai, India
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/tech/support/forums/
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/tech/support/forums/
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/tech/support/forums/
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
>
>
--------------------------------------------------------------
Nova Software, Mumbai, India
--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/