{ "id": "63351", "key": "TIMOB-2719", "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": "11238", "name": "Release 1.6.0 M05", "archived": true, "released": true, "releaseDate": "2011-01-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:59:54.000+0000", "created": "2011-04-15T03:27:43.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "defect", "release-1.6.0" ], "versions": [], "issuelinks": [], "assignee": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:59:54.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 https://gist.github.com/ab80b6d74e1559bdb7f5\nfor example app on Titanium 1.5.1 (tested on Android 1.6 &\n2.2).

\n

We create a simple TableView, add it to a window & open the\nwindow. Now in a loop, we add 15 rows to the TableView with each\nrow having the same className 'item'. Each row contains a view with\n2 different Labels added to it. We use appendRow to add rows to the\nTableView. Expected behaviour is that the rows will be in order\nfrom 1 to 15. However we see that the rows containing odd &\neven numbers are grouped together on either side of the row\ncontaining item 0!

\n

Each row also has an event handler which will alert the row\nnumber. Again, this seems to work in a weird way. There seems to be\nno correspondence between the row number displayed in the label\n& the number displayed in the alert box! Sometimes a few rows\nin the beginning show correlation, but this breaks as soon as we\nstart scrolling.

\n

However, using unique class names for each row seems to fix this\nproblem. But that is supposed to be inefficient & isn't\nrecommended by the documentation. Also Bug 2621 (https://appcelerator.lighthouseapp.com/projects/32238/tickets/2621-...)\noccurs occasionally when we use unique class names.

\n

We tried pushing the rows into an array and using setData to\nupdate the TableView. This doesn't exhibit the initial odd/even\ngrouping of rows. But as soon as we start scrolling, the rows get\ntotally scrambled and the alerts begin exhibiting the behaviour\ndetailed above.

\n

In both these cases, if we change the device orientation then\nsome rows disappear altogether! The alerts on them continue to work\nthough.

{html}", "attachment": [ { "id": "18195", "filename": "app.apk", "author": { "name": "taazza", "key": "taazza", "displayName": "Taazza", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:27:44.000+0000", "size": 1231749, "mimeType": "application/octet-stream" }, { "id": "18196", "filename": "testtar.gz", "author": { "name": "taazza", "key": "taazza", "displayName": "Taazza", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:27:45.000+0000", "size": 121397, "mimeType": "application/x-gzip" } ], "flagged": false, "summary": "TableViewRows containing multiple views & having the same className exhibit weird behaviour", "creator": { "name": "taazza", "key": "taazza", "displayName": "Taazza", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "taazza", "key": "taazza", "displayName": "Taazza", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "129257", "author": { "name": "taazza", "key": "taazza", "displayName": "Taazza", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I am attaching a test apk built using Titanium 1.5.1 on Android\n2.2 which reproduces the weird behaviour seen while using\nappendRow. The code used can be found in the gist mentioned earlier\n(https://gist.github.com/ab80b6d74e1559bdb7f5).

{html}", "updateAuthor": { "name": "taazza", "key": "taazza", "displayName": "Taazza", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:27:45.000+0000", "updated": "2011-04-15T03:27:45.000+0000" }, { "id": "129258", "author": { "name": "taazza", "key": "taazza", "displayName": "Taazza", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

For the sake of completeness, I am attaching the test project\nused to build the test apk.

{html}", "updateAuthor": { "name": "taazza", "key": "taazza", "displayName": "Taazza", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:27:45.000+0000", "updated": "2011-04-15T03:27:45.000+0000" }, { "id": "129259", "author": { "name": "aaronk.saunders", "key": "aaronk.saunders", "displayName": "Aaron K. Saunders", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

seeing same problem in 1.6 build \nhttp://developer.appcelerator.com/question/97621/more-tableviewrow-...

{html}", "updateAuthor": { "name": "aaronk.saunders", "key": "aaronk.saunders", "displayName": "Aaron K. Saunders", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:27:46.000+0000", "updated": "2011-04-15T03:27:46.000+0000" }, { "id": "129260", "author": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [7c4e9b3d7822dd742549caa224a8b7d944e279b6])\nrecursively set view proxies on TiUIViews when reusing Views inside\na TableView [#2719 state:fixed-in-qa]
\n\nhttps://github.com/appcelerator/titanium_mobile/commit/7c4e9b3d7822...

{html}", "updateAuthor": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:27:46.000+0000", "updated": "2011-04-15T03:27:46.000+0000" }, { "id": "129261", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Verified on G1/1.6 and Nexus One/2.2.1 using build #e1cb22a

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:27:46.000+0000", "updated": "2011-04-15T03:27:46.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }