Description
*This is a regression from 6.0.4.GA to 6.1.0.GA*
When calling setData on a tableview that already has data, the app will crash
var win = Ti.UI.createWindow({layout:'vertical'});
var button = Ti.UI.createButton({title:'Add'});
var tableData = [{ title: 'Apples' }, { title: 'Bananas' }, { title: 'Carrots' }, { title: 'Potatoes' }];
var secondData = [{ title: 'Apples' }, { title: 'Bananas' }, { title: 'Carrots' }, { title: 'Potatoes' }];
var table = Ti.UI.createTableView({
data: tableData
});
button.addEventListener('click', function () {
table.setData(secondData);
});
win.add(button);
win.add(table);
win.open();
Steps to reproduce
Add the above code to an existing app.js
Build for windows
Click the button
Actual
App crashes
Expected
App should not crash
master: https://github.com/appcelerator/titanium_mobile_windows/pull/1019
FR Passed! Calling setData no longer errors out when the tableview already has data. Test Environment Studio: 4.9.0.201705302345 Appc CLI: 6.2.2 Appc NPM: 4.2.9 Nokia Lumia 550 Windows 10 Mobile emulator 10.0.14393 Windows 10 Pro 10.0.15063
6.1.2 backport: https://github.com/appcelerator/titanium_mobile_windows/pull/1038
6.1.2 backport FR passed and merged
Verified fix in 6.1.2.v20170720023139. Closing ticket