[TIMOB-11385] Android: TableView - RunTime Error as a result of clicking a tableView row
| GitHub Issue | n/a | 
|---|---|
| Type | Bug | 
| Priority | High | 
| Status | Closed | 
| Resolution | Duplicate | 
| Resolution Date | 2012-11-13T01:06:12.000+0000 | 
| Affected Version/s | Release 3.0.0 | 
| Fix Version/s | Release 3.0.0, Release 3.1.0, 2012 Sprint 21 API, 2012 Sprint 21 | 
| Components | Android | 
| Labels | api, module_tableview, qe-and100112, qe-testadded, regression | 
| Reporter | Tamila Smolich | 
| Assignee | Karl Rowley | 
| Created | 2012-10-11T17:21:37.000+0000 | 
| Updated | 2012-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
| File | Date | Size | 
|---|---|---|
| runtime.png | 2012-10-11T17:21:37.000+0000 | 68157 | 
This works with the fix for [TIMOB-11320], I'm going to mark this ticket as a duplicate
Duplicate of [TIMOB-11320]
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)
Reopen to modify the label and fix versions.