{ "id": "138361", "key": "ALOY-1176", "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": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2014-10-22T14:03:08.000+0000", "created": "2014-10-21T21:29:19.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [ { "id": "16596", "name": "Alloy 1.6.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "issuelinks": [ { "id": "42307", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "132785", "key": "ALOY-1098", "fields": { "summary": "Support actionView property of MenuItem in XML markup", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "42309", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "138364", "key": "ALOY-1177", "fields": { "summary": "Implicitly set ns attribute for SearchView to Ti.UI.Android", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "updated": "2014-10-22T14:03:08.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": "DESCRIPTION:\r\nAlloy throws a compilation error when declaring a SearchView as a child of MenuItem ActionView in XML markup.\r\n\r\nREPRODUCTION:\r\nRun the code below in the Genymotion emulator.\r\n\r\n`index.xml`:\r\n{code}\r\n\r\n \r\n \r\n \r\n \r\n \t\r\n \r\n \r\n \r\n \r\n\r\n{code}\r\n\r\n`index.js`:\r\n{code}\r\n$.win.open();\r\n{code}\r\n\r\nRESULTS:\r\nAlloy throws a compilation error:\r\n{code}\r\n[WARN] : ('You attempted to attach an Android Menu to a lightweight Window');\r\n[WARN] : ('or other UI component which does not have an Android activity.');\r\n[WARN] : ('Android Menus can only be opened on TabGroups and heavyweight Windows.');\r\n[ERROR] : \r\n[ERROR] : (/usr/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:189:18)\r\n[ERROR] : (/usr/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:197:11)\r\n[ERROR] : (/usr/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:664:9)\r\n[ERROR] : Alloy compiler failed\r\n[ERROR] Application Installer abnormal process termination. Process exit value was 1\r\n{code}\r\n\r\n\r\nClassic test:\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\nwin.addEventListener(\"open\", function() {\r\n win.activity.onCreateOptionsMenu = function(e) {\r\n var item, menu;\r\n menu = e.menu;\r\n menu.clear();\r\n item = menu.add({\r\n title : \"Search\",\r\n showAsAction: Ti.Android.SHOW_AS_ACTION_ALWAYS,\r\n actionView: Ti.UI.Android.createSearchView({ hintText: \"Type Somethings\" })\r\n });\r\n };\r\n});\r\n\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Compilation Error when adding a SearchView as a child of MenuItem ActionView", "creator": { "name": "bhatfield", "key": "bhatfield", "displayName": "Benjamin Hatfield", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "bhatfield", "key": "bhatfield", "displayName": "Benjamin Hatfield", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Alloy from master Mon Oct 20 14:01:55/b109a668b5b22fb8dd0a61978f84fcce40a3287f\r\nTitanium SDK 3.4.0.GA\r\nAppcelerator Studio 3.4.0.GA\r\nMac OS X 10.9.4\r\nAndroid 4.2.2/API level 19\r\nGenymotion Google Nexus 7 - Android 4.2.2", "comment": { "comments": [ { "id": "328903", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-21T21:47:52.000+0000", "updated": "2014-10-21T21:47:52.000+0000" }, { "id": "328910", "author": { "name": "bhatfield", "key": "bhatfield", "displayName": "Benjamin Hatfield", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Oops. Seems to be a namespace issue. Adding the `ns` attribute allows the Alloy compilation process to succeed. I'll open up an improvement ticket instead to have SearchView implicitly namespaced to \"Ti.UI.Android\" like some of the iOS components.\r\n\r\n{code}\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}", "updateAuthor": { "name": "bhatfield", "key": "bhatfield", "displayName": "Benjamin Hatfield", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-10-21T21:55:31.000+0000", "updated": "2014-10-21T21:55:31.000+0000" }, { "id": "328992", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "I'm going to close this and fix it via ALOY-1177.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-10-22T14:03:08.000+0000", "updated": "2014-10-22T14:03:08.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }