Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24836] Windows: Unable to call updateRow with an already existing row

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2017-08-17T14:47:00.000+0000
Affected Version/sRelease 6.1.0
Fix Version/sRelease 6.2.0
ComponentsWindows
Labelsn/a
ReporterEwan Harris
AssigneeKota Iguchi
Created2017-06-15T18:05:09.000+0000
Updated2017-08-21T10:28:42.000+0000

Description

Description

Calling updateRow with a row that already exists in the tableview freezes the app
var _window = Ti.UI.createWindow();
var data = [{
    title: 'Row 1'
}, {
    title: 'Row 2'
}];
var table = Ti.UI.createTableView({
    data: data
});
_window.add(table);
table.addEventListener('click', TableClick);
function TableClick(evt) {
    alert('table row clicked');
}
var btn2 = Ti.UI.createButton({
    title: 'update row 1',
    width: 120,
    height: 50,
    left: 10,
    bottom: 0
});
btn2.addEventListener('click', DoBtn2Click);
_window.add(btn2);
function DoBtn2Click() {
    table.updateRow(0, table.data[0].rows[0]);
}
_window.open();

Steps to reproduce

Add the above to an existing app.js

Build for a windows target

Actual

App freezes

Expected

Unsure, adding a UI element twice usually causes an error on Windows, could we pull properties from the existing one and create a new one based from that?

Comments

  1. Kota Iguchi 2017-07-10

    https://github.com/appcelerator/titanium_mobile_windows/pull/1035
  2. Kota Iguchi 2017-08-07

    https://github.com/appcelerator/titanium_mobile_windows/pull/1065
  3. Kota Iguchi 2017-08-18

    Merged to 6_2_X https://github.com/appcelerator/titanium_mobile_windows/pull/1079
  4. Ewan Harris 2017-08-21

    Verified in 6.2.0.v20170821001430, closing ticket

JSON Source