TableView tap vs Touch

Hi all, i can’t understand if i’m crazy or there is something wrong.

I ported the widget from 1.0 to 2.0 more or less no pain for one app, but dev overhead in any case.

So i discovered that now we have to events on row tap: a tap and a touch.

In on case we have event.phase = “tap” in the other case we have all nice touch phases.

But in tap we have event.target and in touch we have event.row  :huh:

More over i have to implemente a tap handler? Something as:

if event.phase == “tap” then

 --do all the stuff that i already manage in the touch phases

end

Is there any way to disable tap for tableviews?

Thanks

Hi,

You don’t need to disable tap. You just don’t treat the whole tap phase. Take out the:

if event.phase == “tap” then

 --do all the stuff that i already manage in the touch phases

end

And you’re good.

Alex

yes but if i don’t manage the event if fired in any case. So for tap I won’t do anything and It feels like touch not working.

then what about

if “tap” == phase or “release” == phase then

– your management code

end

would that work? or do you have custom declarations for the press phase as well?

Alex

Yes, i’ve custom declaration for the press phase. I did managed tap at the end…:wink:

@Corona staff - this exposes what I think is a bug.   Try this:

  1.   Load the widget sample code and change line 107 to

if (“release” == phase or phase == “tap”) then

  1.  Then scroll down the list so that say rows 11 - 20 are shown.   Then tap a row.   The tap event is fired all is good.   Then hit the back button and you’re taken back to the table view.   All is good.

  2.  Now tap the ‘TableView’ tab at the bottom.   The row tap event is fired you’re shown the “you select item x”.

Not good :frowning:

I would really appreciate a solution for this so we can have the tap and press event for the table view but so they are not triggered inaccurately when tapping the tab.

Thanks!

Hi dweezil,

If you think you found a bug please file in a bug report.

Thanks,

Alex

Bug report filed.

Thanks a lot, i’ll have a look.

A great day,

Alex

Any idea when a fix will be available for us STARTER edition users?

Hi dweezil,

Just letting you know that the bug you reported is fixed in 1149, and the updated widget library on github will be made available on Monday.

Thanks again for reporting, and a great weekend,

Alex

TA.   Can I actually use the latest version as I’m just a starter edition user?

If so how can I use it?   Where do I place it after I’ve downloaded from github?

Ta.

Hi,

You don’t need to disable tap. You just don’t treat the whole tap phase. Take out the:

if event.phase == “tap” then

 --do all the stuff that i already manage in the touch phases

end

And you’re good.

Alex

yes but if i don’t manage the event if fired in any case. So for tap I won’t do anything and It feels like touch not working.

then what about

if “tap” == phase or “release” == phase then

– your management code

end

would that work? or do you have custom declarations for the press phase as well?

Alex

Yes, i’ve custom declaration for the press phase. I did managed tap at the end…:wink:

@Corona staff - this exposes what I think is a bug.   Try this:

  1.   Load the widget sample code and change line 107 to

if (“release” == phase or phase == “tap”) then

  1.  Then scroll down the list so that say rows 11 - 20 are shown.   Then tap a row.   The tap event is fired all is good.   Then hit the back button and you’re taken back to the table view.   All is good.

  2.  Now tap the ‘TableView’ tab at the bottom.   The row tap event is fired you’re shown the “you select item x”.

Not good :frowning:

I would really appreciate a solution for this so we can have the tap and press event for the table view but so they are not triggered inaccurately when tapping the tab.

Thanks!

Hi dweezil,

If you think you found a bug please file in a bug report.

Thanks,

Alex

Bug report filed.

Thanks a lot, i’ll have a look.

A great day,

Alex