How to clear keyboard buffer? My touch happens twice..

Hello everyone,

I have a scene with a tableview for selecting a state and I use the onRowTouch which works well. Then the screen it goes to after that has some buttons on it. If I touch a row that is in the same position of the screen as a button on the next scene the button event fires also. I’m not holding my finger down - I’m just touching it. Is there any way to keep this from happening?

Thanks,

Warren

Hi Warren,

In your onRowTouch listener function, did you remember to return true at the end?

Hi Brent, can you explain the purpose of return true statements? Should it be in every function we make? I see it in everyone’s code but never understood it. Thanks

Hi Nate,

Putting “return true” is used for various purposes, but in the case of functions that handle touches, it essentially prevents the touch from “propagating” past the first touched object to other objects below it (in front-to-back order of z-index).

Hope this helps,

Brent

Hi Warren,

In your onRowTouch listener function, did you remember to return true at the end?

Hi Brent, can you explain the purpose of return true statements? Should it be in every function we make? I see it in everyone’s code but never understood it. Thanks

Hi Nate,

Putting “return true” is used for various purposes, but in the case of functions that handle touches, it essentially prevents the touch from “propagating” past the first touched object to other objects below it (in front-to-back order of z-index).

Hope this helps,

Brent