Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19013] Windows: App crashes when triggering eventListener on a table view

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2015-06-15T17:56:44.000+0000
Affected Version/sRelease 4.1.0
Fix Version/sRelease 4.1.0
ComponentsWindows
Labelsqe-4.1.0
ReporterEwan Harris
AssigneeKota Iguchi
Created2015-06-12T20:51:27.000+0000
Updated2015-06-24T23:23:50.000+0000

Description

Description

When adding an event listener to a table view, when the event is triggered the app crashes
var win = Ti.UI.createWindow({backgroundColor:'black'});

var tableData = [ {title: 'Apples'}, {title: 'Bananas'}, {title: 'Carrots'}, {title: 'Potatoes'} ];

var table = Ti.UI.createTableView({
  data: tableData
});

table.addEventListener('click', function(e){
    alert(e.rowData);
});

win.add(table);
win.open();

Steps To Reproduce

1. Add the above code to an existing app.js 2. Build to a windows phone device or emulator

Actual Result

The app crashes

Expected Result

The app should not crash and an alert should be shown with the text in the row tapped displayed

Comments

  1. Kota Iguchi 2015-06-14

    https://github.com/appcelerator/titanium_mobile_windows/pull/281
  2. Lokesh Choudhary 2015-06-24

    Verified the fix. The app does not crash after an event listener is triggered on a tableview. Closing. Environment: Appc Studio: 4.1.0.201506221807 Ti SDK: 4.1.0.v20150624142618 Ti CLI: 4.0.1 Alloy: 1.6.2 Windows: 8.1 Enterprise 64-bit APPC NPM: 4.1.0-1 APPC CLI: 4.1.0-3 Device: Nokia Lumia 928 - Windows Phone 8.1 Windows emulator : 8.1

JSON Source