{ "id": "133950", "key": "ALOY-1102", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2014-10-23T19:07:07.000+0000", "created": "2014-07-31T08:29:34.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "updated": "2014-10-23T20:15:04.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "12326", "name": "XML", "description": "View XML and parsing" } ], "description": "h2. Description\r\nFollowing ticket ALOY-1082 I tried to create a module for ListView. While the code (pasted below) works fine using SDK 3.3.0.GA, an error is thrown when building with 3.2.3.GA.\r\n\r\nh2. Code\r\nCode as proposed by [~skypanther] is the following:\r\n\r\nlib/customlist.js\r\n\r\n{code}\r\nvar ListView = function(args) {\r\n this.view = Ti.UI.createListView(args);\r\n}\r\n \r\nListView.prototype.addMeASectionPlease = function(items) {\r\n var section = Ti.UI.createListSection();\r\n section.setItems(items);\r\n return this.view.appendSection(section);\r\n}\r\nListView.prototype.getView = function() {\r\n return this.view;\r\n}\r\n \r\nexports.createListView = function(args) {\r\n return new ListView(args);\r\n};\r\n{code}\r\n\r\nindex.xml\r\n\r\n{code}\r\n\r\n \r\n \r\n\r\n{code}\r\n\r\nindex.js\r\n\r\n{code}\r\n$.addButton.addEventListener('click', function() {\r\n var items = [\r\n {myLabel: {text:'Foo'}, template:'template', properties: {backgroundColor: 'purple'}},\r\n {myLabel: {text:'Bar'}, template:'template'},\r\n {myLabel: {text:'Baz'}, template:'template'}\r\n ];\r\n $.mylist.addMeASectionPlease(items);\r\n})\r\n \r\n$.index.open();\r\n{code}\r\n\r\nh2. Error\r\n\r\nFollowing the error when running the app on iOS Simulator:\r\n\r\n{code}\r\n[ERROR] : Script Error {\r\n[ERROR] : backtrace = \"#0 () at file:///Users/USER/Library/Application%20Support/iPhone%20Simulator/7.1/Applications/CFCEF8AE-346F-4338-AE45-9BF2B447D10B/AlloyTestListView.app/alloy.js:231\";\r\n[ERROR] : line = 59;\r\n[ERROR] : message = \"-[__NSDictionaryM krollObjectForBridge:]: unrecognized selector sent to instance 0xce8e420\";\r\n[ERROR] : sourceId = 301971840;\r\n[ERROR] : sourceURL = \"file:///Users/USER/Library/Application%20Support/iPhone%20Simulator/7.1/Applications/CFCEF8AE-346F-4338-AE45-9BF2B447D10B/AlloyTestListView.app/alloy/controllers/index.js\";\r\n[ERROR] : }\r\n{code}", "attachment": [], "flagged": false, "summary": "Module for ListView is not working when using SDK 3.2.3", "creator": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "closedSprints": [ { "id": 234, "state": "closed", "name": "2014 Sprint 21 Alloy", "startDate": "2014-10-13T16:36:31.077Z", "endDate": "2014-10-25T01:36:00.000Z", "completeDate": "2014-10-27T13:28:36.470Z", "originBoardId": 124 } ], "comment": { "comments": [ { "id": "329206", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "This works in SDK 3.3.0.GA and 3.4.0.GA, hence closing as won't fix.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-10-23T19:07:07.000+0000", "updated": "2014-10-23T19:07:07.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }