You are right Jeff,

With the timeout set to -1, this simulator just goes to sleep because there
is nothing to process, and if you move the stylus over the screen, it starts
to move again.
But on the real T3, it keeps on racing along. So the trick is to find out
what the events are that it comes back with. There is no such thing as
"View" "Events" on the real T3, but displaying data on the screen, events
coming out of EvtGetEvent() does not seem to work yet!!!
Oh its going now and guess what, it's the nilEvent that is returned all the
time by EvtGetEvent(), until you move the stylus on the screen of course and
press buttons.
Where is this nilEvent coming from? Anybody got an idea?

Gert

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jeffry Loucks
Sent: Wednesday, 16 March 2005 14:31
To: Palm Developer Forum
Subject: RE: EvtGetEvent on T3

EvtGetEvent() will return "no later than" your timeout (give or take). On
the real device, something is demanding attention at flank speed.
EvtGetEvent() has no way to tell you it isn't returning an event. It always
returns an event, just sometimes it's a nilEvent. Better yet, the nilEvent
may mean something to someone somewhere for timing or whatever, so you
generally have to treat them all as real events.

The TC does the same thing. 

--------------------
Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-----Original Message-----
From: Gert van Kruiningen 
Sent: Tuesday, March 15, 2005 5:05 PM
To: Palm Developer Forum
Subject: EvtGetEvent on T3


The EvtGetEvent function behaves different on T3 simulator and real T3
The timeout parameter in the EvtGetEvent specifies the number of timer ticks
before checking if there is an event in the event queue. With the value set
at -1 (evtWaitForever) the T3 only wakes up if there is an event. For any
other value, it wakes up every "timeout" timerticks to check for an event.
If there is nothing, it sends an "nilEvent" into the event queue.
The code below works fine on the T3 simulator (OS 5.2.1) where the dot is
stepping across the screen at a 1 step per second (100 timerticks per
second). When you move the stylus over the screen sysPenMove events are
generated which make the dot speed up when ever the stylus is moving.
But;
On the real T3 (the same version:OS 5.2.1) however, the speed at wich the
dot moves is irrelevent of the parameter of 100 in the EvtGetEvent function.
It always moves at 100 dots per second. Note that the number of timer ticks
per seconds is 100.

Anyone know why the real T3 is not behaving??

Regards
Gert



static void AppEventLoop(void)
{
    EventType event;

    do
    {
        static UInt16 x = 0;

        WinEraseLine(x,  80, x,  80);
        x++;
        if (x > 150) x = 0;
        WinDrawLine(x,  80, x,  80);

        EvtGetEvent(&event, 100);


        if (! SysHandleEvent(&event))
        {
            if (! MenuHandleEvent(0, &event, &error))
            {
                if (! AppHandleEvent(&event))
                {
                    FrmDispatchEvent(&event);
                }
            }
        }
    } while (event.eType != appStopEvent);
}

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



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

Reply via email to