TableView Touch EventListener

Hi, I’m wondering if it is normal to only have “began” for the event.phase? I would like to have “ended” as well, is this planned in the short term or should I already have this event phase?

I need this to be able to finish implementing a custom gesture in the table view: Drag Up and release. I want to copy the behavior of facebook which is to drag up and then to release to see new wallposts.

Thanks for your help! [import]uid: 134384 topic_id: 24812 reply_id: 324812[/import]

  1. I really want to see that refresh code as well, seriously considering implementing that myself.

  2. Not sure why you’ve suggested “began” when I think widget.newTableView uses “press”, right?

In any case, widget.newTableView has a bug in that the “release” event only occurs if you do not scroll.

I’m not on the Corona team or anything but I’m strongly guessing that the function uses scrollView for scrolling, and that function right now has a bug where it can’t recognize the ended phase most of the time, hence why they are both broken.

Unfortunately widget fixes have been put on the backlog for quite some time now, probably because Ansca has had bigger fish to fry (namely, bugs, Apple getting rid of UID, the release of iPad 3 and Kindle Fire, etc.)

Again, I’m only guessing, but I bet that the recent announcement of going to two week sprints for bugs vs. new features is probably a response to their backlog. As much as we want some things fixed there are also features that have been on the want list for a long time too. :slight_smile: [import]uid: 41884 topic_id: 24812 reply_id: 100647[/import]

  1. “press” seems to be sent for button like widget, such as buttons or rows. If you remember seeing “press” it’s probably from the phase when clicking a row. If you add a listener to “touch” either to Runtime or to the tableView directly: you should only see “began”. Interestingly, you’ll notice the same behavior for the Runtime as long as you drag on the tableView.

And yeah… I also have the feeling that they have a pretty big backlog. :smiley:

Thanks for the reply! [import]uid: 134384 topic_id: 24812 reply_id: 101262[/import]

Yeah, the press vs. began stuff is pretty confusing. I imagine that gets cleaned up eventually.

Interestingly enough not registering ended/released is actually in-line with how Apple has implemented scrollviews/tableviews (for example, load the mail app; any scrolling at all cancels the press). But the functionality should still be there as there are lots of things that detecting the end of a press would be useful for.

(Of course I can think of a lot of things it needs. Like fixed masks, or a refresh function) :slight_smile: [import]uid: 41884 topic_id: 24812 reply_id: 101274[/import]

Figured I’d chime in since this was completely un-obvious to me, but scrollView actually does have the missing functionality. It’s just newTableView that does not.

scrollView handles events through event.type as per this page, not event.phase. So making a drag-refresh function for scrollviews seems pretty feasible.

For TableView, I tried and it doesn’t seem to have the same functionality exposed. So we still need to wait on that end… [import]uid: 41884 topic_id: 24812 reply_id: 101855[/import]