{ "id": "64111", "key": "TIMOB-3479", "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": "11251", "name": "Sprint 2011-16", "archived": true, "released": true, "releaseDate": "2011-04-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-21T09:54:18.000+0000", "created": "2011-04-15T03:45:44.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-21T16:52:11.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}

When allowsSelection = true on a TiUITableView and there are\nmore rows than can be displayed on the screen, selecting a row\ncauses rows at repeated intervals offscreen to also be\nselected.

\n

An example is attached.

\n

The problem is that a cell's state isn't being properly reset\nwhen it is reused, hence when the selected cell goes offscreen it\nbecomes available for reuse resulting in the next drawn cell to be\nselected.

\n

I believe the cause of this is actually the TiUITableViewCell\nincorrectly overriding setSelected:.

\n

See \nhttp://developer.appcelerator.com/question/116611/impossible-to-com...\nfor information and a solution.

\n

In TiUITableView.m setSelected: doesn't call the corresponding\nmethod on super:

\n
\n-(void)setSelected:(BOOL)yn\n{\n    [super setHighlighted:yn];\n    [self updateGradientLayer:yn|[self isHighlighted]];\n}\n
\n

it should be changed to:

\n
\n-(void)setSelected:(BOOL)yn\n{\n    [super setSelected:yn];\n    [super setHighlighted:yn];\n    [self updateGradientLayer:yn|[self isHighlighted]];\n}\n
\n

which fixes the problem.

{html}", "attachment": [ { "id": "18328", "filename": "app.js", "author": { "name": "jolon", "key": "jolon", "displayName": "Jolon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:45:44.000+0000", "size": 271, "mimeType": "application/x-javascript" } ], "flagged": false, "summary": "Selecting a row in TiUITableView causes rows at regular intervals to also be selected (allowsSelection)", "creator": { "name": "jolon", "key": "jolon", "displayName": "Jolon", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jolon", "key": "jolon", "displayName": "Jolon", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "132555", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I have tested the solution code and it does solve the problem. There is a helpdesk ticket that needs this fix.\n\nhttp://support.appcelerator.com/tickets/APP-156113/homepage", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-21T08:22:09.000+0000", "updated": "2011-04-21T08:22:09.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }