{ "id": "63356", "key": "TIMOB-2724", "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": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13406", "description": "Sprint 2012-10 API", "name": "Sprint 2012-10 API", "archived": true, "released": true, "releaseDate": "2012-05-20" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-05-11T16:31:56.000+0000", "created": "2011-04-15T03:27:50.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "SupportTeam", "api", "module_tableview", "qe-testadded" ], "versions": [ { "id": "11225", "name": "Release 1.5.0", "archived": true, "released": true, "releaseDate": "2010-12-14" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2012-07-10T12:52:29.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}

According to the API:

\r\n

\r\nhttp://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI....
\r\nselectRow - programmatically select a row

\r\n

I've tested this on the iphone and ipad and they both fail to\r\nselect a row. Attached below is a quick example.

\r\n

edit:
\r\nIt seems this bug happens when there are rows that go off the\r\ndevice screen. If I do like 10 or 11 rows it works fine. 12+ it\r\nbreaks (on iphone)

\r\n

On the iPad obviously you can fit more rows so this number will\r\nbe higher.

{html}", "attachment": [ { "id": "18197", "filename": "cm-movie-1.mov", "author": { "name": "ronnieswietek", "key": "ronnieswietek", "displayName": "Ronnie Swietek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:27:51.000+0000", "size": 5222671, "mimeType": "video/quicktime" }, { "id": "18198", "filename": "selectrow_test.zip", "author": { "name": "ronnieswietek", "key": "ronnieswietek", "displayName": "Ronnie Swietek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:27:53.000+0000", "size": 1815900, "mimeType": "application/zip" } ], "flagged": false, "summary": "iOS: selectRow fails in TableViews", "creator": { "name": "ronnieswietek", "key": "ronnieswietek", "displayName": "Ronnie Swietek", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ronnieswietek", "key": "ronnieswietek", "displayName": "Ronnie Swietek", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "129267", "author": { "name": "ronnieswietek", "key": "ronnieswietek", "displayName": "Ronnie Swietek", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

attached a new dumbed down version

{html}", "updateAuthor": { "name": "ronnieswietek", "key": "ronnieswietek", "displayName": "Ronnie Swietek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:27:53.000+0000", "updated": "2011-04-15T03:27:53.000+0000" }, { "id": "129268", "author": { "name": "ronnieswietek", "key": "ronnieswietek", "displayName": "Ronnie Swietek", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Titanium 1.5.1 and iphone sdk 4.2

{html}", "updateAuthor": { "name": "ronnieswietek", "key": "ronnieswietek", "displayName": "Ronnie Swietek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:27:54.000+0000", "updated": "2011-04-15T03:27:54.000+0000" }, { "id": "129269", "author": { "name": "ronnieswietek", "key": "ronnieswietek", "displayName": "Ronnie Swietek", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

am I doing something wrong when posting bugs? Mine never seem to\nget assigned to anyone. Here is a thread of other people claiming\nits a bug

\n

\nhttp://developer.appcelerator.com/question/96361/selectrow-on-a-tab...

{html}", "updateAuthor": { "name": "ronnieswietek", "key": "ronnieswietek", "displayName": "Ronnie Swietek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:27:54.000+0000", "updated": "2011-04-15T03:27:54.000+0000" }, { "id": "129270", "author": { "name": "ronnieswietek", "key": "ronnieswietek", "displayName": "Ronnie Swietek", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Can we get some attention on this? TableView is a pretty common\nUI element that should be at least medium priority.

{html}", "updateAuthor": { "name": "ronnieswietek", "key": "ronnieswietek", "displayName": "Ronnie Swietek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:27:54.000+0000", "updated": "2011-04-15T03:27:54.000+0000" }, { "id": "129271", "author": { "name": "ronnieswietek", "key": "ronnieswietek", "displayName": "Ronnie Swietek", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I found that selectRow works in 1.5.0 but not 1.5.1

{html}", "updateAuthor": { "name": "ronnieswietek", "key": "ronnieswietek", "displayName": "Ronnie Swietek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:27:54.000+0000", "updated": "2011-04-15T03:27:54.000+0000" }, { "id": "129272", "author": { "name": "ronnieswietek", "key": "ronnieswietek", "displayName": "Ronnie Swietek", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

ok I lied. I've come to this conclusion

\n

It seems this bug happens when there are rows that go off the\ndevice screen. If I do like 10 or 11 rows it works fine. 12+ it\nbreaks (on iphone)

\n

On the iPad obviously you can fit more rows so this number will\nbe higher.

{html}", "updateAuthor": { "name": "ronnieswietek", "key": "ronnieswietek", "displayName": "Ronnie Swietek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:27:54.000+0000", "updated": "2011-04-15T03:27:54.000+0000" }, { "id": "129273", "author": { "name": "jeremyswensen", "key": "jeremyswensen", "displayName": "Jeremy Swensen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I've noticed the same problem. I can reproduce the problem with\nonly 5 rows when the height of the rows are set to 100px. I agree\nwith Ronnie that when the rows go off the device screen the\nselectRow method will not work.

\n

I have also noticed that selecting a single row causes another\nrow to automatically be selected. For instance, if I click the\nfirst row and select it, and then scroll down another row was\nautomatically selected.

\n

Is there a workaround for this?

{html}", "updateAuthor": { "name": "jeremyswensen", "key": "jeremyswensen", "displayName": "Jeremy Swensen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:27:55.000+0000", "updated": "2011-04-15T03:27:55.000+0000" }, { "id": "129274", "author": { "name": "ronnieswietek", "key": "ronnieswietek", "displayName": "Ronnie Swietek", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Why wasn't a bug like this fixed in the 1.6 release?? I screen\nrecorded a test app I made and you can see the list is\nlengthy...about 30 rows..If I start scrolling, random rows start to\nget selected. Note, I have no clicked on any rows..uhmmm??

\n

Don I am selecting you as the \"who is responsible\". I've seen\nyou get many things fixed around here..well and I am just not\nfamiliar with anyone else.

{html}", "updateAuthor": { "name": "ronnieswietek", "key": "ronnieswietek", "displayName": "Ronnie Swietek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:27:55.000+0000", "updated": "2011-04-15T03:27:55.000+0000" }, { "id": "129275", "author": { "name": "ronnieswietek", "key": "ronnieswietek", "displayName": "Ronnie Swietek", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Thanks for addressing this Don, but low priority? The list is\npretty unusable at this point. Also what does TBS stand for?

{html}", "updateAuthor": { "name": "ronnieswietek", "key": "ronnieswietek", "displayName": "Ronnie Swietek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:27:55.000+0000", "updated": "2011-04-15T03:27:55.000+0000" }, { "id": "129276", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I've moved it over to the iOS lead to classify. It's not my\nposition to classify the priority of his items. TBS means \"To Be\nScheduled\"

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:27:55.000+0000", "updated": "2011-04-15T03:27:55.000+0000" }, { "id": "129277", "author": { "name": "jolon", "key": "jolon", "displayName": "Jolon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I've found a solution to this which is described here:

\n

\nhttp://developer.appcelerator.com/question/96361/selectrow-on-a-tab...

\n

In essence, TiUITableView delays setting the selection of the\ntable view until the last cell is display (for some reason).\nHowever, if the last cell is not visible then it won't trigger the\nselection.

\n

My work around is to remove the check for the last row, so it\nwill now trigger when the first cell is displayed. This works fine\nbecause it will only trigger once due to the initiallyDisplayed\nvariable being set to YES within the if statement.

\n

In TiUITableView.m change tableView:willDisplayCell:

\n

if (initiallyDisplayed==NO && [indexPath\nsection]==[sections count]-1 && [indexPath row]==[section\nrowCount]-1)

\n

to:

\n

if (initiallyDisplayed==NO)

{html}", "updateAuthor": { "name": "jolon", "key": "jolon", "displayName": "Jolon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:27:56.000+0000", "updated": "2011-04-15T03:27:56.000+0000" }, { "id": "165530", "author": { "name": "slim.mckins", "key": "slim.mckins", "displayName": "Slim McKinsley", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Bump, can we please get this bug prioritized? I am waiting on this fix to release an iPad app. Also waiting on a related fix for tableView.scrollToIndex() to work on iPad.", "updateAuthor": { "name": "slim.mckins", "key": "slim.mckins", "displayName": "Slim McKinsley", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-09-09T11:18:51.000+0000", "updated": "2011-09-09T11:18:51.000+0000" }, { "id": "168651", "author": { "name": "nickmilner", "key": "nickmilner", "displayName": "Nick Milner", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Bump. Bump. I too am waiting on a fix for this. Any ETA on a fix ?", "updateAuthor": { "name": "nickmilner", "key": "nickmilner", "displayName": "Nick Milner", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-10T09:10:35.000+0000", "updated": "2011-10-10T09:10:35.000+0000" }, { "id": "170967", "author": { "name": "james.wragg", "key": "james.wragg", "displayName": "James Wragg", "active": true, "timeZone": "Europe/London" }, "body": "I'm being plagued with this bug too.\r\n\r\nHere is a clear screencast of the issue: http://screencast.com/t/xXHuMoXc\r\nAnd another test-case here: https://gist.github.com/1329382\r\n\r\nAny ETA?\r\n", "updateAuthor": { "name": "james.wragg", "key": "james.wragg", "displayName": "James Wragg", "active": true, "timeZone": "Europe/London" }, "created": "2011-10-31T15:20:38.000+0000", "updated": "2011-10-31T15:20:38.000+0000" }, { "id": "184964", "author": { "name": "james.wragg", "key": "james.wragg", "displayName": "James Wragg", "active": true, "timeZone": "Europe/London" }, "body": "Bump. The .selectRow() method does not work, it would be great to get some kind of ETA of when it will. Thanks.", "updateAuthor": { "name": "james.wragg", "key": "james.wragg", "displayName": "James Wragg", "active": true, "timeZone": "Europe/London" }, "created": "2012-03-03T08:38:23.000+0000", "updated": "2012-03-03T08:38:23.000+0000" }, { "id": "194474", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Test Case {code}\r\n\r\nvar win = Titanium.UI.createWindow({ \r\n\tlayout:'vertical',\r\n backgroundColor:'#fff'\r\n});\r\n\r\nvar createSection = function(title,rowCount){\r\n\tvar s1 = Titanium.UI.createTableViewSection({\r\n\t\theaderTitle:title\r\n\t});\r\n\t\r\n\tfor (i=0;i 0)\r\n\t{\r\n\t\ttblView.selectRow(val);\r\n\t}\r\n})\r\n\r\nwrapper.add(btn);\r\n\r\nwin.add(wrapper);\r\n\r\n\r\nwin.add(tblView);\r\n\r\n\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-05-10T16:58:11.000+0000", "updated": "2012-05-10T16:58:11.000+0000" }, { "id": "199501", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing issue\r\n\r\nTested with Ti Studio build 2.1.0.201206200844\r\nTi Mobile SDK 2.1.0.v20120619172256 hash rd3a84b13\r\nOSX Lion 10.7.3\r\niPhone 4S OS 5.1\r\n\r\nThe expected behavior is shown", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-20T18:38:05.000+0000", "updated": "2012-06-20T18:38:05.000+0000" } ], "maxResults": 20, "total": 20, "startAt": 0 } } }