{ "id": "110028", "key": "ALOY-533", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [ { "id": "15402", "description": "Alloy 1.2.0, concurrent with SDK 3.1.0", "name": "Alloy 1.2.0", "archived": false, "released": true, "releaseDate": "2013-08-15" }, { "id": "15571", "description": "2013 Sprint 15", "name": "2013 Sprint 15", "archived": true, "released": true, "releaseDate": "2013-07-29" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-07-19T19:03:56.000+0000", "created": "2013-02-22T16:10:52.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "qe-testadded" ], "versions": [], "issuelinks": [ { "id": "30299", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "116498", "key": "ALOY-724", "fields": { "summary": "Implement Ti.Android.Menu with TabGroup", "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": "High", "id": "2" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-07-24T00:07:04.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": "12329", "name": "Runtime", "description": "Generic bucket for uncategorized runtime issues" }, { "id": "12326", "name": "XML", "description": "View XML and parsing" } ], "description": "If you define a lightweight window that includes the definition of a 'menu' and attempt to 'open' it, at runtime it will display an obscure error message -- \"Uncaught TypeError: Cannot call method 'extend' of undefined\"\r\n\r\n(see attached screen shot)\r\n\r\nIt turns out that this is due to the fact that a menu can only be defined on a heavyweight window. Changing the window definition to be a heavyweight window resolves the issue.\r\n\r\nIt would be helpful to have the error message indicate that you are attempting to set a menu on a lightweight window.\r\n\r\nReproduction Steps:\r\n1. Create a new Alloy project (use the default 'simple' template)\r\n2. Edit the index.xml file\r\n3. Add a menu to the window definition\r\n4. Run as an Android application (simulator or device)\r\n\r\nYou should get the attached error dialog\r\n\r\n5. Add the 'navBarHidden=true' attribute to the 'Window' element in index.xml\r\n6. Run as an Android application (simulator or device)\r\n\r\nThe application should run fine and you should see the menu when you press the menu button.\r\n", "attachment": [ { "id": "35697", "filename": "Screen Shot 2013-02-22 at 10.03.29 AM.png", "author": { "name": "jenglish", "key": "jenglish", "displayName": "Jeff English", "active": true, "timeZone": "America/Chicago" }, "created": "2013-02-22T16:10:52.000+0000", "size": 27187, "mimeType": "image/png" } ], "flagged": false, "summary": "Better error message when defining menu on a lightweight window", "creator": { "name": "jenglish", "key": "jenglish", "displayName": "Jeff English", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "jenglish", "key": "jenglish", "displayName": "Jeff English", "active": true, "timeZone": "America/Chicago" }, "environment": "Alloy 0.3.6\r\nTi SDK 3.0.0\r\nAndroid", "closedSprints": [ { "id": 13, "state": "closed", "name": "2013 Sprint 15", "startDate": "2013-07-16T15:31:17.586Z", "endDate": "2013-07-29T15:31:17.586Z", "completeDate": "2013-09-26T16:01:41.136Z" } ], "comment": { "comments": [ { "id": "262499", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/alloy/pull/189\r\ntest app: https://github.com/appcelerator/alloy/tree/master/test/apps/ui/android_menu\r\n\r\nThis only needs to be tested functionally on Android. Follow these steps.\r\n\r\n# Run the test app on Android\r\n# on Window 1, press the menu button to open the Android Menu. You should see a \"help\" and \"home\" button, like in the first attached screenshot.\r\n# Click the \"home\" button, which should open window 2.\r\n# Click the menu button again, which should open the a menu with different menu buttons (wrench and arrow), pictured in the second screenshot\r\n\r\nafter you have confirmed that you are getting 2 separate menus, go back to the app code and try this now:\r\n\r\n# Open \"app/styles/win2.tss\" and remove \"modal: false\". This will make the window 2 a lightweight window.\r\n# Run the app again\r\n# Follow steps 2-3 from the first section\r\n# Check the console log and make sure you see the warning in the 3rd screenshot\r\n# Click the menu button. It should be the same menu as the first window since window 2 is lightweight and cannot hold its own menu.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-19T19:03:56.000+0000", "updated": "2013-07-19T19:03:56.000+0000" }, { "id": "262919", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified as fixed.\n\nEnvironment:\n\nTitanium SDK 3.1.2.v20130718094558\nAlloy 1.2.0\nAppcelerator Studio 3.1.1.201306131423\nLiveView 0.1.28\n\nAndroid device 4.2.2\n\nClosing.", "updateAuthor": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-23T23:48:09.000+0000", "updated": "2013-07-23T23:48:09.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }