>During debugging, I discovered that we're actually getting events showing
>*future* tap positions!   Since I don't think we've invented a time machine
>(reminiscent of Jame's Hogan's "Thrice Upon a Time") I'm assuming that the
>pen-up/down structures are corrupted *after* they're already enqueued.


After an "arguetecting" session, we decided it looks like pen-up and pen-down
events are handled somewhat differently...

It looks like the pen coordinates of pen-down events are remembered "properly" -
as you'd expect; the event with its associated pen coordinates.

But it looks like only the *last* pen UP coordinate is remembered, although it
seems to remember that a pen up occured.

so a sequence like:

d  26,  6 'z' u  26,  6
d  25, 25 'f' u  26, 22
d  42,  6 'v' u  42,  6
d  43, 20 'i' u  43, 20
d  57,  7 'c' u  57,  7
d  59, 20 't' u  59, 20
d  69,  8 'h' u  71, 21* 'H'
d  71, 21 'a' u  84, 20* 'A'
d  80,  8 'w' u  99, 14* 'W'
d  84, 20 'l' u  99, 14* 'L'
d  97,  3 'k' u  99, 14* 'K'
d  99, 14 'y' u  99, 14


happens something like this...

up until the pen-down for the H is fine...

then (chronologically) we have:


event 1:        pen-down at 69,8 (for the H)
event 2:        pen-up - remember that a penUp occured,
        and remember the "last pen-up position" as 69,8

At this point, Fitaly calls EvtGetEvent and gets event 1; penDown with the
proper coordinates

event 3:        pen-down at 71,21 (for the A)
event 4:        pen-up - remember that this penUp occured, 
        and update the "last pen-up position" as 71,21

At this point, Fitaly calls EvtGetEvent and gets event 2; penUp, but with the
now-wrong (for that penUp event) coordinates of 71,21

pen-down at 80,8 (for the W)
pen-up - remember that this penUp occured, and update the "last pen-up position"
as 80, 8

event 5:        pen-down at 84, 20 (for the L)
event 6:        pen-up - remember that this penUp occured, 
        and update the "last pen-up position" as 84, 20

Fitaly gets event 3; penDown with the proper coordinates

Fitaly gets event 4; penUp, but with the now-wrong (for that penUp event)
coordinates of 84, 20

event 7:        pen-down at 97,3 (for the K)
event 8:        pen-up - remember that this penUp occured, 
        and update the "last pen-up position" as 97,3

Fitaly gets event 5; penDown with the proper coordinates

event 9:        pen-down at 99,14 (for the Y)
event 10:
        pen-up - remember that this penUp occured, 
        and update the "last pen-up position" as 99,14

Fitaly gets event 6; penUp, but with the now-wrong (for that penUp event)
coordinates of 99, 14

Fitaly gets event 7; penDown with the proper coordinates

Fitaly gets event 8; penUp, but with the now-wrong (for that penUp event)
coordinates of 99, 14

Fitaly gets event 9; penDown with the proper coordinates

Fitaly gets event 9; penUp with the proper coordinates (because there were no
more penUp events to corrupt the "last pen-up position"


Naturally, I'm showing Fitaly processing the events "just so" the errors make
sense; there can be some jitter in the above sequence and failures still occur
properly - I don't have any way to track the processing and pen activity quite
that closely...   (darn!  I wish I could trap the pen enqueuing!  :)


Is this what's happening under the covers?  Is it really not tracking each penUp
position individually?

- Al -

-- 
--  Alan Weiner  --  [EMAIL PROTECTED]  --  http://www.ajw.com


Reply via email to