Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13174] Android: Tableview: Shows Runtime Error on longpressing on any row

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2013-03-26T21:23:47.000+0000
Affected Version/sRelease 3.1.0
Fix Version/sRelease 3.1.0, 2013 Sprint 07 Core, 2013 Sprint 07
ComponentsAndroid
Labelsmodule_tableview, qe-devCheck, qe-sdk3.1.0, qe-testadded, regression
ReporterDhirendra Jha
AssigneeAllen Yeung
Created2013-03-23T11:12:03.000+0000
Updated2014-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

FileDateSize
device.png2013-03-23T11:12:03.000+0000101898
log.txt2013-03-23T11:12:03.000+00001465

Comments

  1. Allen Yeung 2013-03-26

    This seems like a regression caused by https://github.com/vishalduggal/titanium_mobile/commit/1121388b23e60153a3c9ea1cedce3c0609451b9e
  2. Dhirendra Jha 2013-03-28

    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 .

JSON Source