litan/kojo

Exception when using a touch screen laptop

Closed this issue ยท 8 comments

The exception happens when we touch the canvas during Showcase/Tic Tac Toe (or Othello) instead of using the left mouse button to click. The good news is that it doesn't break the game. However, each touch event results in an exception and a long stack trace.

Note that touching the Run button on the script editor works OK.

Here is the log file:

error-at-first-touch-tic-tac-toe.log

litan commented

This looks to be triggered by an event that Piccolo2D (the scene graph lib under the drawing canvas) does not recognize.
Will investigate...

litan commented

I have an initial fix for this (commit is shown above). Please try it out @bulent2k2.

I just verified that the fix works on my ChromeOS tablet. Thanks so much Lalit.

On the otherhand, it looks like this fix disables the roll wheel (or two finger swipe on the touch pad) to Zoom :-(

I checked it on MacOS, and it has the same issue.

litan commented

Ah, we can't have that!
I'll get access to a touch device running Kojo in a day or two. Will explore further then...

litan commented

Had a thought, checked in a (theoretical) refinement to the earlier fix.
Please give this one a try, @bulent2k2.

This one works, Lalit! Verified that the roll wheel (or two finger swipe) works for zooming in and out. And, there is no stack dump due to exceptions.

Thank you very much!

litan commented

Sounds good!