Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2196] ListView Event Handler crashes app when reading row data

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionNeeds more info
Resolution Date2013-03-28T21:11:07.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterItay Avtalyon
AssigneeMauro Parra-Miranda
Created2013-03-28T12:38:01.000+0000
Updated2016-03-08T07:41:11.000+0000

Description

Steps to Reproduce

In a template, attach an event listener to one of the sub-views. Add 'touchstart' event listener. Trying to get the data of the row like this: var index - e.rowIndex; var section = e.section; var data = section.getItemAt(index). Will crash. Furthermore, e.rowIndex is undefined. e.itemIndex does return the right index for the row. When the event is switched to click instead, everything works.

Actual Result

Crash.

Expected Result

Getting the row data.

Attachments

FileDateSize
.log2013-03-28T12:38:19.000+00004045409
app.js2013-03-29T09:59:49.000+00007751
diagnostic5006707211611153818.log2013-03-28T12:38:24.000+00004437

Comments

  1. Carter Lathrop 2013-03-28

    Itay, Would you mind providing a piece of reproducible test code that displays this issue, one that can be simply copied and pasted into an app.js and that clearly shows the problem. When submitting bugs with this relevant data it ensures a much quicker review time and can be more quickly moved to engineering for the fix. For future reference: https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report Thank you for your patience, Carter
  2. Itay Avtalyon 2013-03-29

    A sample App.JS that has sample data with three views demonstrating the problem
  3. Itay Avtalyon 2013-03-29

    Uploaded a sample app with sample data. In each row, clicking the yellow and green views the application crashes. Clicking the red shows the expected results. (Also, Ti.UI.SIZE doesn't seem to work when applied to the height of the row in this template).

JSON Source