{ "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.

\n

There 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...

\n

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.

\n

His code is fairly abstracted out but here are some examples of\nhis code: http://pastie.org/1485195

\n

Most 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.

\n
\n

Using 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)

\n

Below 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
{html}", "attachment": [ { "id": "18241", "filename": "img_0587.MOV", "author": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "created": "2011-04-15T03:32:40.000+0000", "size": 1791536, "mimeType": "application/octet-stream" }, { "id": "18240", "filename": "img_0588.MOV", "author": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "created": "2011-04-15T03:32:39.000+0000", "size": 1395523, "mimeType": "application/octet-stream" } ], "flagged": false, "summary": "iOS / iPad: setData in anything post 1.4.x flickers", "creator": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "subtasks": [], "reporter": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "environment": null, "comment": { "comments": [ { "id": "129684", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Having problems trying to recreate this. Some of this may be due\nto fixes that have happened since the bug was logged.

{html}", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:32:41.000+0000", "updated": "2011-04-15T03:32:41.000+0000" }, { "id": "129685", "author": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "body": "{html}

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.

{html}", "updateAuthor": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "created": "2011-04-15T03:32:41.000+0000", "updated": "2011-04-15T03:32:41.000+0000" }, { "id": "129686", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

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?

{html}", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:32:41.000+0000", "updated": "2011-04-15T03:32:41.000+0000" }, { "id": "129687", "author": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "body": "{html}

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.

{html}", "updateAuthor": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "created": "2011-04-15T03:32:41.000+0000", "updated": "2011-04-15T03:32:41.000+0000" }, { "id": "129688", "author": { "name": "brian", "key": "brian", "displayName": "Brian", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

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:

\n

tableView.hide();
\ntableView.setData(data);
\nsetTimeout(function() {
\ntableView.show(); },50);

\n

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.

{html}", "updateAuthor": { "name": "brian", "key": "brian", "displayName": "Brian", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:32:42.000+0000", "updated": "2011-04-15T03:32:42.000+0000" }, { "id": "129689", "author": { "name": "brian", "key": "brian", "displayName": "Brian", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I created a new ticket that has a better example of the\nissue:

\n

\nhttps://appcelerator.lighthouseapp.com/projects/32238/tickets/3407-...

{html}", "updateAuthor": { "name": "brian", "key": "brian", "displayName": "Brian", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:32:42.000+0000", "updated": "2011-04-15T03:32:42.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }