{ "id": "165729", "key": "ALOY-1541", "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": "19280", "name": "Release 6.2.0", "archived": false, "released": true }, { "id": "19363", "name": "alloy 1.9.9", "archived": false, "released": true, "releaseDate": "2017-04-03" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-02-16T09:10:06.000+0000", "created": "2017-02-02T10:17:56.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "alloy" ], "versions": [], "issuelinks": [], "assignee": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "updated": "2018-03-05T17:44:34.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": "Require LeftNavButton/RightNavButton working while LeftNavButtons/RightNavButtons not working\r\n\r\nexample\r\n{code:xml|title=index.xml}\r\n\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n\r\n{code:xml|title=navbar.xml}\r\n\r\n\t\r\n\t\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n\r\ncompiled code problem\r\n{code:javascript|title=Resources/iphone/alloy/controllers/navbar.js}\r\n var leftNavButtons = [];\r\n $.__views.__alloyId2 = Ti.UI.createButton({\r\n title: \"aaa\",\r\n id: \"__alloyId2\"\r\n });\r\n leftNavButtons.push($.__views.__alloyId2);\r\n $.__views.__alloyId3 = Ti.UI.createButton({\r\n title: \"bbb\",\r\n id: \"__alloyId3\"\r\n });\r\n leftNavButtons.push($.__views.__alloyId3);\r\n // >>>>> THIS IS THE ERROR <<<<< //\r\n void 0.leftNavButtons = leftNavButtons;\r\n $.__views.navbar && $.addTopLevelView($.__views.navbar);\r\n{code}\r\n\r\nwhile LeftNavButton compile to\r\n{code:javascript|title=Resources/iphone/alloy/controllers/navbar.js}\r\n $.__views.__alloyId2 = Ti.UI.createButton({\r\n title: \"Btn1\",\r\n id: \"__alloyId2\"\r\n });\r\n __parentSymbol.leftNavButton = $.__views.__alloyId2;\r\n $.__views.navbar && $.addTopLevelView($.__views.navbar);\r\n{code}", "attachment": [], "flagged": false, "summary": "XML: Require LeftNavButtons/RightNavButtons not working", "creator": { "name": "hazemkhaled", "key": "hazemkhaled", "displayName": "Hazem Khaled", "active": true, "timeZone": "Europe/Istanbul" }, "subtasks": [], "reporter": { "name": "hazemkhaled", "key": "hazemkhaled", "displayName": "Hazem Khaled", "active": true, "timeZone": "Europe/Istanbul" }, "environment": null, "closedSprints": [ { "id": 1007, "state": "closed", "name": "2018 Sprint 05 Tooling", "startDate": "2018-02-25T17:48:46.503Z", "endDate": "2018-03-11T16:48:00.000Z", "completeDate": "2018-03-11T22:21:44.972Z", "originBoardId": 219 } ], "comment": { "comments": [ { "id": "406137", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hey [~hazemkhaled], thanks for the ticket! Looks like you already digged into it, are you able to provide a fix as well? :-)", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-02-02T12:52:38.000+0000", "updated": "2017-02-02T12:52:38.000+0000" }, { "id": "406138", "author": { "name": "hazemkhaled", "key": "hazemkhaled", "displayName": "Hazem Khaled", "active": true, "timeZone": "Europe/Istanbul" }, "body": "Yes I'm but no luck, first time to dig into Alloy compile, if you guide where to hack I'll do it.\n\nThanks", "updateAuthor": { "name": "hazemkhaled", "key": "hazemkhaled", "displayName": "Hazem Khaled", "active": true, "timeZone": "Europe/Istanbul" }, "created": "2017-02-02T13:02:22.000+0000", "updated": "2017-02-02T13:02:22.000+0000" }, { "id": "406139", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~fmiao] can you assist this man?", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-02-02T13:08:54.000+0000", "updated": "2017-02-02T13:08:54.000+0000" }, { "id": "406498", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "[~hazemkhaled], looks like the parent symbol is not probably set when {{LeftNavButtons/RightNavButtons}} is in another view. The exact location you can look into is, https://github.com/appcelerator/alloy/blob/master/Alloy/commands/compile/parsers/Alloy.Abstract._ItemArray.js#L110\r\n\r\nTry setting the parent symbol to the default {{CONST.PARENT_SYMBOL_VAR}} if it's not in the parsing state. That should fix it.", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2017-02-07T06:00:24.000+0000", "updated": "2017-02-07T06:00:24.000+0000" }, { "id": "406964", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "PR: https://github.com/appcelerator/alloy/pull/816\r\n\r\nFunctional Test:\r\n1. Run the test app included in the PR.\r\n2. There should be no compile error.", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2017-02-14T06:04:31.000+0000", "updated": "2017-02-14T06:09:51.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }