{ "id": "63062", "key": "TIMOB-2430", "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": "11240", "name": "Release 1.6.0 M07", "archived": true, "released": true, "releaseDate": "2011-01-31" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:59:05.000+0000", "created": "2011-04-15T03:19:31.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "dynamic", "label", "regression", "release-1.6.0", "tableview", "tableviewrow" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:59:05.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}

Similar to #2208, adding a label dynamically to a\nTableViewRow does not show up. One has to refresh the entire table\n(via setData([]); setData(tableRowData);) to see the added\nlabel.

\n

Given both of these tickets, there is probably a problem with\njust about anything added to a tableview row dynamically showing up\nwithout a full refresh.

\n

Code worked in 1.4.0. From #2208 seems\nlike it was a 1.5.x regression.

{html}", "attachment": [], "flagged": false, "summary": "adding labels to tableviewrow dynmaically fails: redraw bug", "creator": { "name": "robby", "key": "robby", "displayName": "Robby", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "robby", "key": "robby", "displayName": "Robby", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "128434", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Robby, please provide a quick sample if you're going to add\ntickets directly and also provide the information from the\nversion.txt file in the build of the mobilesdk you're using.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:19:31.000+0000", "updated": "2011-04-15T03:19:31.000+0000" }, { "id": "128435", "author": { "name": "robby", "key": "robby", "displayName": "Robby", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Hey Don,

\n

Here's the code example. This shows off this bug, as well as the\none in #2208.
\nVersion.txt info of my 1.5 build: version=1.5.0 timestamp=11/24/10\n04:54 githash=c0aff27
\nThis code works perfectly on this 1.4.2 build: version=1.4.2\ntimestamp=10/11/10 19:02 githash=425bc37

\n
\nTi.API.info(\"@ win_test.js\");\nvar win = Ti.UI.currentWindow;\nwin.backgroundColor = \"#b5aea5\";\n\nvar displayName = Ti.UI.createLabel({\n  top: 0,\n  left: 0,\n  font:{fontSize: 20, fontWeight:'bold'},\n  height: 30,\n  width: 320,\n  color:'#000000',\n  text:\"Testing 123\"\n});\nwin.add(displayName);\n\nvar rowData = [];\nfor (var i = 0; i < 1; i++) {\n  var row = Ti.UI.createTableViewRow({\n    height: 50,\n    title: \"Row \" + i,\n    color: \"#000000\",\n    backgroundColor:\"#DDDDDD\",\n    className: 'rowbla'\n  });\n  rowData.push(row);\n}\n\nvar tableView = Ti.UI.createTableView({\n  top:displayName.top + displayName.height + 10,\n  data: rowData\n});\nwin.add(tableView);\n\nwin.addEventListener('focus', function(e) {\n  setTimeout(changeColors, 2000);\n});\n\nfunction changeColors() {\n  //dynamic bg color change of label\n  //this always works\n  displayName.backgroundColor = \"#0000FF\";\n  \n  //dynamic bg color change of row 1\n  //this never works (it sometimes work if we do it on the window focus event, never if we do it on delay)\n  rowData[0].backgroundColor = \"#0000FF\";\n  \n  //dynamic add label to row 2\n  //this never works (it sometimes work if we do it on the window focus event, never if we do it on delay)\n  var newLabel = Ti.UI.createLabel({\n    top: 5,\n    left: 5,\n    font:{fontSize: 20, fontWeight:'bold'},\n    height: 'auto',\n    width: 'auto',\n    color:'#00FF00',\n    text:\"NEW LABEL BLA\"\n  });\n  rowData[0].add(newLabel);\n}\n
{html}", "updateAuthor": { "name": "robby", "key": "robby", "displayName": "Robby", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:19:32.000+0000", "updated": "2011-04-15T03:19:32.000+0000" }, { "id": "128436", "author": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [8aa0ef980e344bddcf4e5f60eda9e43a0a14cd17])\nupdate a TableViewRow's view when a child is added or removed\n[#2430 state:fixed-in-qa] \nhttps://github.com/appcelerator/titanium_mobile/commit/8aa0ef980e34...

{html}", "updateAuthor": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:19:32.000+0000", "updated": "2011-04-15T03:19:32.000+0000" }, { "id": "128437", "author": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "body": "{html}

verified with test case from Robby

{html}", "updateAuthor": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "created": "2011-04-15T03:19:33.000+0000", "updated": "2011-04-15T03:19:33.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }