{ "id": "127237", "key": "TIMOB-16594", "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": "15935", "description": "2014 Sprint 06", "name": "2014 Sprint 06", "archived": true, "released": true, "releaseDate": "2014-03-28" }, { "id": "15936", "description": "2014 Sprint 06 SDK", "name": "2014 Sprint 06 SDK", "archived": true, "released": true, "releaseDate": "2014-03-28" }, { "id": "15971", "description": "Release 3.2.3", "name": "Release 3.2.3", "archived": false, "released": true, "releaseDate": "2014-04-30" }, { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-03-17T19:59:05.000+0000", "created": "2014-03-06T04:39:34.000+0000", "priority": null, "labels": [ "crash", "delete", "event", "ios", "listview", "qe-closed-3.2.3", "qe-testadded", "tintColor" ], "versions": [], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-03-18T21:08:48.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": "An editable ListView with a RefreshControl crashes if tintColor is defined for the RefreshControl AND one tries to JSON.stringify() the delete event object. \r\n\r\nExpected behavior: JSON.strigify(e) should work on the delete event, regardless of the RefreshControl and its tintColor property.\r\n\r\nTest with code below. Swipe delete one row and the following error gets logged:\r\n\r\nbq. alloyblank[56590:320b] -[UIDeviceRGBColor boundBridge:withKrollObject:]: unrecognized selector sent to instance 0xcc53e30\r\n\r\nSwipe delete another one, and the app crashes with:\r\n\r\nbq. [ valueForUndefinedKey:]: this class is not key value coding-compliant for the key toJSON.\r\n \r\n{code:title=index.xml}\r\n\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n\r\n{code:title=index.js}\r\nvar refresh = Ti.UI.createRefreshControl({ \r\n // DEFINING THIS WILL CRASH DELETE EVENT\r\n tintColor: '#ff0000'\r\n});\r\n\r\n\r\n$.lv.applyProperties({\r\n refreshControl: refresh\r\n});\r\n\r\n\r\nvar rows = [];\r\nfor (var i = 0; i < 50; i++) {\r\n rows.push({ properties: { title: 'Row '+ i, canEdit: true }});\r\n}\r\n\r\n\r\n$.ls.setItems(rows);\r\n\r\n\r\n$.index.open();\r\n\r\n\r\nfunction lv_delete(e) {\r\n Ti.API.info('this works: ' + e.itemIndex); \r\n\r\n // JSON.stringify(e) WILL CRASH IF tintColor IS DEFINED ABOVE\r\n Ti.API.info('stringify: ' + JSON.stringify(e)); \r\n}\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "iOS: Editable ListView with RefreshControl + tintColor crashes swipe-delete event.", "creator": { "name": "bcproductions", "key": "bcproductions", "displayName": "Ed", "active": true, "timeZone": "America/Havana" }, "subtasks": [], "reporter": { "name": "bcproductions", "key": "bcproductions", "displayName": "Ed", "active": true, "timeZone": "America/Havana" }, "environment": "iOS 7, SDK 3.2.1GA.", "comment": { "comments": [ { "id": "296159", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Classic test code\n\n{code}\nvar win = Ti.UI.createWindow({backgroundColor:'white',fullscreen:true})\n\nvar refresh = Ti.UI.createRefreshControl({ \n // DEFINING THIS WILL CRASH DELETE EVENT\n tintColor: '#ff0000'\n});\n\n\nvar listView = Ti.UI.createListView({refreshControl: refresh});\n\nvar fruitSection = Ti.UI.createListSection({ headerTitle: 'Fruits'}); \n \n \nvar rows = [];\nfor (var i = 0; i < 50; i++) {\n rows.push({ properties: { title: 'Row '+ i, canEdit: true }});\n}\n \n \nfruitSection.setItems(rows);\n\nlistView.setSections([fruitSection]);\n\nwin.add(listView);\n \n \nwin.open();\n \n \nfunction lv_delete(e) {\n Ti.API.info('this works: ' + e.itemIndex); \n \n // JSON.stringify(e) WILL CRASH IF tintColor IS DEFINED ABOVE\n Ti.API.info('stringify: ' + JSON.stringify(e)); \n}\n\n\nlistView.addEventListener('delete',lv_delete);\n{code}\n", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-03-07T19:22:57.000+0000", "updated": "2014-03-07T19:22:57.000+0000" }, { "id": "296160", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending \r\nmaster - https://github.com/appcelerator/titanium_mobile/pull/5442\r\n3_2_X - https://github.com/appcelerator/titanium_mobile/pull/5482\r\n", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-03-07T19:24:11.000+0000", "updated": "2014-03-15T19:23:03.000+0000" }, { "id": "297764", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested and verified the fix with:\nAppcelerator Studio, build: 3.2.3.201403171239\nTitanium SDK, build: 3.2.3.v20140317142455\nNode.JS Version: v0.10.13\nNPM Version: 1.3.2\n├── acs@1.0.14\n├── alloy@1.3.1\n├── npm@1.3.2\n├── titanium@3.2.1\n└── titanium-code-processor@1.1.0", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-03-18T21:08:18.000+0000", "updated": "2014-03-18T21:08:18.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }