{ "id": "133949", "key": "ALOY-1127", "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": [ { "id": "16596", "name": "Alloy 1.6.0", "archived": false, "released": true, "releaseDate": "2015-05-21" }, { "id": "16692", "name": "Alloy 1.7.0", "archived": false, "released": true, "releaseDate": "2015-07-22" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-10-07T03:16:32.000+0000", "created": "2014-07-31T08:17:21.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "TCSupport", "alloy" ], "versions": [], "issuelinks": [], "assignee": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "updated": "2015-03-26T20:53:14.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": "13605", "name": "Models" } ], "description": "Similar to ALOY-691 the same example fails if using the {{formFactor}} attribute. See following example using Alloy 1.4.1 . It results in a crash.\r\n\r\n{code:title=views/index.xml}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n{code}\r\n\r\n{code:title=controllers/index.js}\r\n$.index.addEventListener('open', function () {\r\n $.destroy();\r\n});\r\n \r\n$.index.open(); \r\n \r\nrender();\r\n{code}\r\n\r\n{code:title=models/test.js}\r\nexports.definition = {\r\n \r\n configuration : {\r\n \"columns\": {\r\n \"username\":\"string\"\r\n },\r\n \"adapter\": {\r\n \"type\": \"sql\",\r\n \"collection_name\": \"test\"\r\n },\r\n },\r\n \r\n extendModel: function(Model) {\r\n \r\n _.extend(Model.prototype, {});\r\n \r\n return Model;\r\n },\r\n \r\n extendCollection: function(Collection) {\r\n \r\n _.extend(Collection.prototype, {});\r\n \r\n return Collection;\r\n }\r\n}\r\n{code}\r\n\r\nThis will generate the following code in {{destroy()}} although always only one of those can be defined at a moment. To reproduce just run it on iOS.\r\n\r\n{code}\r\nexports.destroy = function() {\r\n __alloyId5.off(\"fetch destroy change add remove reset\", render);\r\n __alloyId12.off(\"fetch destroy change add remove reset\", render);\r\n};\r\n{code}\r\n\r\nError message will be for instance\r\n{code}\r\n'undefined' is not an object (evaluating '__alloyId5.off')\r\n{code}\r\n\r\nLink to Q&A: http://developer.appcelerator.com/question/176639/alloys-data-binding-feature-does-not-respect-handheld-property", "attachment": [], "flagged": false, "summary": "Alloys Data Binding feature does not respect formFactor property", "creator": { "name": "jicks83", "key": "jicks83", "displayName": "Jick Steen", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "jicks83", "key": "jicks83", "displayName": "Jick Steen", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "closedSprints": [ { "id": 228, "state": "closed", "name": "2014 Sprint 20 Alloy", "startDate": "2014-09-29T13:30:47.322Z", "endDate": "2014-10-13T13:30:00.000Z", "completeDate": "2014-10-13T18:08:16.541Z", "originBoardId": 124 } ], "comment": { "comments": [ { "id": "321194", "author": { "name": "jicks83", "key": "jicks83", "displayName": "Jick Steen", "active": true, "timeZone": "Europe/Berlin" }, "body": "FYI: Same error happens when using new \"if\" condition instead of \"platform and formFactor\" attribute.", "updateAuthor": { "name": "jicks83", "key": "jicks83", "displayName": "Jick Steen", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-09-01T06:43:20.000+0000", "updated": "2014-09-01T06:43:20.000+0000" }, { "id": "321882", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "[~tlukasavage]: Hello! can you please set Jick Steen as the reporter? For some reason when I move this bugs, the reporter gets changed in automatic and I can't edit them later. ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-09-04T18:50:40.000+0000", "updated": "2014-09-04T18:50:40.000+0000" }, { "id": "323064", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "I need further info to proceed. Starting with this as an example:\r\n\r\n{code}\r\n\r\n\t\r\n\t\r\n\t\t\r\n\t\t\r\n\t\r\n\t\r\n\t\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n\r\nWhat should happen if the developer:\r\n\r\n- uses a different dataFunction name for each of the form factor \"branches\"?\r\n- uses a custom dataFunction name for one form factor, but not the other (omits {{dataFunction=\"render\"}})?\r\n- uses different UI components in the two \"branches\" (e.g. TableView in one, ScrollableView in the other)? And does that affect the preceding dataFunction name questions?\r\n\r\nWhich of those are error conditions that should be caught vs. which need to be made to work?", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-09-11T14:29:19.000+0000", "updated": "2014-09-11T14:29:19.000+0000" }, { "id": "326347", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "PR https://github.com/appcelerator/alloy/pull/580\r\n\r\nFunctional test:\r\n\r\n1. Run the included ALOY\\-1127 test app for a handset. You should get a table with blue labels in the rows.\r\n2. Run it again for a tablet. Rows should have red labels.\r\n3. Edit index.xml to remove or rename the dataFunction for either of the form factors (e.g. for the handheld window, change to {{dataFunction=\"renderMe\"}}). Then, re-run for both form factors.\r\n\r\nIn all cases, the app should run without error and display the appropriately colored rows.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-09-30T15:43:40.000+0000", "updated": "2014-09-30T15:43:40.000+0000" }, { "id": "327106", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "PR merged.", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2014-10-07T03:16:32.000+0000", "updated": "2014-10-07T03:16:32.000+0000" }, { "id": "338826", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "Backport to 1_6_X : https://github.com/appcelerator/alloy/pull/651", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2015-01-13T04:15:52.000+0000", "updated": "2015-01-13T04:16:05.000+0000" }, { "id": "347473", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed using:\r\n\r\nTitanium SDK 4.0.0.v20150325201813\r\nStudio 4.0.0.201503232213\r\nAppc NPM: 0.3.35\r\nAppc CLI 0.2.192\r\nXcode 6.2\r\nAlloy 1.6.0-alpha\r\n\r\nOn:\r\niPhone 6 Sim, iOS 8.2\r\niPad 2 Sim, iOS 8.2\r\n\r\nStyling and data binding perform as expected across the two platforms.", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-03-26T20:53:14.000+0000", "updated": "2015-03-26T20:53:14.000+0000" } ], "maxResults": 14, "total": 14, "startAt": 0 } } }