{ "id": "63542", "key": "TIMOB-2910", "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": "11241", "name": "Release 1.6.0 M08", "archived": true, "released": true, "releaseDate": "2011-02-07" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T02:00:25.000+0000", "created": "2011-04-15T03:32:39.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "ios", "quickstart-customer", "regression", "release-1.6.0", "rplist", "tableview" ], "versions": [], "issuelinks": [], "assignee": { "name": "rpfeiffer", "key": "rpfeiffer", "displayName": "Ralf Pfeiffer", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T02:00:25.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}
setData() sometimes performs strange when using it in\nconjunction with a window focus event.
\nThere have been a few reports of flickering and other odd\nbehaviors on the q/a forums, i.e.:
\n\nhttp://developer.appcelerator.com/question/91471/updating-table-on-...
\n\nhttp://developer.appcelerator.com/question/92611/tableview-renderin...
In the specific case of a quickstart customer I am assisting,\ntable row contents flicker when setData is called on a window focus\nevent. Attached is a video to show you what it is doing.
\nHis code is fairly abstracted out but here are some examples of\nhis code: http://pastie.org/1485195
\nMost of his custom methods for creating rows, etc. are just\nwrappers for native Ti code. Nothing magical going on in the\nbackground - just stuff to help him manage the app. I can provide\nthat if you need it.
\nUsing the sample code below - on the sim the label positioned on\nthe right hand side jumps over to the right - http://screencast.com/t/nsqmRxa37Z.\nOn the device this does not happen but a black area flickers for a\nshort bit. (see attached video)
\nBelow is some sample code to run. It doesn't duplicate some of\nthe issues exactly but does still show a few oddities (in both the\nsim and device) as mentioned above:
\n\nvar win = Titanium.UI.currentWindow;\n\nvar rows = [];\n\nvar tableview = Ti.UI.createTableView();\n\nfor (var i=0; i < 10; i++) {\n var row = Ti.UI.createTableViewRow({\n left: 0,\n top: 0,\n height: 50, \n width: '100%',\n separatorStyle: Ti.UI.iPhone.TableViewSeparatorStyle.NONE, \n backgroundColor: 'transparent', \n color: 'Red',\n selectedBackgroundImage: ''\n });\n \n var label = Ti.UI.createLabel({top: 10, left: 10, height: 22, width: 100, color: '#444', text: 'sometext', font: {fontFamily: 'Helvetica Neue', fontSize:20, fontWeight:'bold'}, textAlign: 'left'});\n \n var label2 = Ti.UI.createLabel({top: 10, right: 10, height: 22, width: 100, color: '#444', text: 'sometext', font: {fontFamily: 'Helvetica Neue', fontSize:20, fontWeight:'bold'}, textAlign: 'left'});\n \n row.add(label);\n row.add(label2);\n \n rows.push(row);\n};\n\nvar button = Ti.UI.createButton({\n title: \"setData\",\n width: 50,\n height: 50,\n top: 10,\n right: 10\n});\n\nwin.addEventListener('focus', function() {\n setTimeout(function() {\n tableview.setData(rows);\n }, 1000);\n});\n\nbutton.addEventListener('click', function() {\n tableview.setData(rows);\n});\n\ntableview.addEventListener('click', function() {\n var newwin = Ti.UI.createWindow({\n title: 'New window',\n url: 'test.js'\n });\n Ti.UI.currentTab.open(newwin, { animated: true });\n});\n\nwin.add(tableview);\nwin.add(button);
\n
Having problems trying to recreate this. Some of this may be due\nto fixes that have happened since the bug was logged.
This hasn't been an issue since early last week in the latest\nbuilds. I actually thought you fixed this since it was working last\nweek.
Hunh. I figured it might have been the case, but knowing how\nbugs can be interrelated or have common roots, I didn't have this\nbug in mind when fixing the others. If the issue has gone away for\nyou, shall we call this one fixed-in-qa?
Yes I think that's safe to do. I haven't tested with the build\ntoday but it worked all week last week. I suppose it'd be good to\nknow that fixed it to avoid regression issues.
This still doesn't work in 1.6.1...whenever you call setData on\na tableView...the entire table flickers really bad. On an iPhone 3G\nit's even worse. The workaround everyone is using is the\nfollowing:
\ntableView.hide();
\ntableView.setData(data);
\nsetTimeout(function() {
\ntableView.show(); },50);
But unfortunately this workaround won't work for my\napp....please re-open this bug. It's a really ugly one that seems\nto have around for a while now.
I created a new ticket that has a better example of the\nissue:
\n\nhttps://appcelerator.lighthouseapp.com/projects/32238/tickets/3407-...