Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11385] Android: TableView - RunTime Error as a result of clicking a tableView row

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2012-11-13T01:06:12.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sRelease 3.0.0, Release 3.1.0, 2012 Sprint 21 API, 2012 Sprint 21
ComponentsAndroid
Labelsapi, module_tableview, qe-and100112, qe-testadded, regression
ReporterTamila Smolich
AssigneeKarl Rowley
Created2012-10-11T17:21:37.000+0000
Updated2012-11-13T01:07:09.000+0000

Description

Description: RunTime Error as a result of clicking a tableView row. This is a regression, does not occur in 2.1.3. Steps: 1. Run the following code:
/*
 * A simple project based on Single Window Application Template:
 * to test minimal cases
 */
 
//bootstrap and check dependencies
if (Ti.version < 1.8 ) {
    alert('Sorry - this application template requires Titanium Mobile SDK 1.8 or later');       
}
 
// This is a single context application with mutliple windows in a stack
(function() {   
    var self = Titanium.UI.createWindow({
        title: 'Window',
        backgroundColor: 'white',
        });    
 
 
    var row;
    var data = [];
         
    for(i=0;i<10;i++) {
            var l = Ti.UI.createLabel({text: "Test row " + i, left: '10dp', right: '30dp' });
            var r = Ti.UI.createTableViewRow({rownumber: i, hasCheck: false, backgroundColor: '#eeeeee', className: 'datarow'});
            r.add(l);
            data.push(r);
    }
         
    var tv = Ti.UI.createTableView({
            data: data,
            backgroundColor: 'transparent',
            style: Ti.UI.iPhone.TableViewStyle.GROUPED,
            minRowHeight: '52dp',
            top: '30dp', bottom: '60dp'
    });
 
    tv.addEventListener('click', function(e){
        Ti.API.info("Row number " + e.row.rownumber + " clicked");
        e.row.hasCheck = !e.row.hasCheck;
    });
     
    self.add(tv);
    self.open();
})();
2. Click any row Expected: Row should be clicked and log should display 'Row number # clicked' Actual: RunTime Error

Attachments

FileDateSize
runtime.png2012-10-11T17:21:37.000+000068157

Comments

  1. Karl Rowley 2012-10-11

    This works with the fix for [TIMOB-11320], I'm going to mark this ticket as a duplicate
  2. Karl Rowley 2012-10-11

    Duplicate of [TIMOB-11320]
  3. Tamila Smolich 2012-10-17

    Closing as fixed. Verified and tested on: Titanium Studio, build: 3.0.0.201210151149 Titanium SDK, builds: 3.0.0.v20121017100120; 3.1.0.v20121017102121 Device: Nexus 7 (4.1.1)
  4. Ping Wang 2012-11-13

    Reopen to modify the label and fix versions.

JSON Source