[TIMOB-13174] Android: Tableview: Shows Runtime Error on longpressing on any row
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-03-26T21:23:47.000+0000 |
Affected Version/s | Release 3.1.0 |
Fix Version/s | Release 3.1.0, 2013 Sprint 07 Core, 2013 Sprint 07 |
Components | Android |
Labels | module_tableview, qe-devCheck, qe-sdk3.1.0, qe-testadded, regression |
Reporter | Dhirendra Jha |
Assignee | Allen Yeung |
Created | 2013-03-23T11:12:03.000+0000 |
Updated | 2014-01-30T21:24:35.000+0000 |
Description
This is regression. The issue does not exist on 3.0.2.
Steps to Reproduce:
1. Create an application with code below and launch the application
2. Longpress on any row
Actual: Shows Runtime Error with source error "Ti.API.info('customProp: ' + e.rowData.customProp);". Please find the attached log file and screen shot.
Expected: Should not show the Runtime Error.
var _window = Ti.UI.createWindow();
var tableData = []
var s = 0;
var nRow = 0;
for(var i = 0; i < 100; i++){
var createNewSection = (i + 1) % 10 == 9 || i == 0 ? true : false;
createNewSection ? nRow = 1 : nRow++;
tableData.push({
title:'Row #' + nRow + ' Index #' + i + ' Section #' + s,
customProp:'Hello World! #' + i,
header: createNewSection ? 'Section #' + s++ : null
});
}
var table = Ti.UI.createTableView({
data: tableData
});
_window.add(table);
table.addEventListener('longpress', function(e){
Ti.API.info('Section: ' + e.section);
Ti.API.info('Row: ' + e.row);
Ti.API.info('Row Data: ' + e.rowData);
Ti.API.info('Index: ' + e.index);
Ti.API.info('customProp: ' + e.rowData.customProp);
});
_window.open();
Attachments
File | Date | Size |
---|---|---|
device.png | 2013-03-23T11:12:03.000+0000 | 101898 |
log.txt | 2013-03-23T11:12:03.000+0000 | 1465 |
This seems like a regression caused by https://github.com/vishalduggal/titanium_mobile/commit/1121388b23e60153a3c9ea1cedce3c0609451b9e
Tested With - SDK: 3.1.0.v20130327135307 Studio: 3.1.0.201303261815 Device: Samsung Galaxy Tab (3.2), Nexus 7 (V4.1) Mac OS - 10.8 CLI - 3.0.25-alpha Result - Now its working as expected, does not show Runtime error on long-pressing on any row .