[ALOY-533] Better error message when defining menu on a lightweight window
|Fix Version/s||Alloy 1.2.0, 2013 Sprint 15|
DescriptionIf 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" (see attached screen shot) It 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. It would be helpful to have the error message indicate that you are attempting to set a menu on a lightweight window. Reproduction Steps: 1. Create a new Alloy project (use the default 'simple' template) 2. Edit the index.xml file 3. Add a menu to the window definition 4. Run as an Android application (simulator or device) You should get the attached error dialog 5. Add the 'navBarHidden=true' attribute to the 'Window' element in index.xml 6. Run as an Android application (simulator or device) The application should run fine and you should see the menu when you press the menu button.
|Screen Shot 2013-02-22 at 10.03.29 AM.png||2013-02-22T16:10:52.000+0000||27187|