{ "id": "62778", "key": "TIMOB-2146", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11225", "name": "Release 1.5.0", "archived": true, "released": true, "releaseDate": "2010-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:58:13.000+0000", "created": "2011-04-15T03:11:49.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "defect" ], "versions": [], "issuelinks": [], "assignee": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2011-04-17T01:58:13.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{html}

See Helpdesk\n50231 for example.

\n

Not marking as a regression yet. Bill if you think it is, please\ntag it that way.

{html}", "attachment": [], "flagged": false, "summary": "Android: setData not always updating", "creator": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "127621", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

Workaround is to set to empty array then set to real data.

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:11:49.000+0000", "updated": "2011-04-15T03:11:49.000+0000" }, { "id": "127622", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

confirmed this is already fixed in 1.5. My test:

\n
\n\nvar win = Ti.UI.currentWindow;\nvar data = [];\nfor (var i = 0; i < 8; i++) {\n    data.push(\n        Ti.UI.createTableViewRow({ title: 'Row ' + (i + 1), color: 'black', backgroundColor: 'yellow'})\n    );\n}\n\nvar tv = Ti.UI.createTableView({\n    top: 40, data: data\n});\n\nwin.add(tv);\n\nvar btn = Ti.UI.createButton({\n    title: 'setData()',\n    top: 0,\n    left: 0,\n    width: 150,\n    height: 35\n});\n\nbtn.addEventListener('click', function() {\n    data.push( Ti.UI.createTableViewRow({ title: 'Another row', color: 'black', backgroundColor: 'white'}));\n    tv.setData(data);\n});\n\nwin.add(btn);\n
{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:11:50.000+0000", "updated": "2011-04-15T03:11:50.000+0000" }, { "id": "127623", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

(from [536e81c80f9fef69c2681fde27f74b029b75a79c])\n[#2146] Add unit test to be sure setData\nsuccessfully replaces existing data rows. \nhttps://github.com/appcelerator/titanium_mobile/commit/536e81c80f9f...

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:11:50.000+0000", "updated": "2011-04-15T03:11:50.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }