javierdotnet / gwt-ext

Automatically exported from code.google.com/p/gwt-ext
1 stars 3 forks source link

I am using gwtext-2.0.4 version and GWT 1.5 RC-1. i am fasing problem when creating menu item using item class. i am reciving "Object doesn't support this property or method" in the item class . #364

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create Menu object.
2. Create Item object to add menu.
3. Add Item to create menu object.

What is the expected output? What do you see instead?
Expected output is to add menu item to menu.
Insted i am reciving below error.
Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError): 
Object doesn't support this property or method
 number: -2146827850
 description: Object doesn't support this property or method
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative
(ModuleSpace.java:443)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid
(ModuleSpace.java:235)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid
(JavaScriptHost.java:107)
    at com.gwtext.client.widgets.menu.Item.<clinit>(Item.java:41)
    at com.zt.ebizsmart.client.ActionMenu.init(ActionMenu.java:275)
    at com.zt.ebizsmart.client.ActionMenu.<init>(ActionMenu.java:41)
    at com.zt.ebizsmart.client.TopPanel.init(TopPanel.java:42)
    at com.zt.ebizsmart.client.EbizSmartui.onModuleLoad2
(EbizSmartui.java:102)
    at com.zt.ebizsmart.client.EbizSmartui.access$0
(EbizSmartui.java:89)
    at com.zt.ebizsmart.client.EbizSmartui$1.execute
(EbizSmartui.java:84)

What version of the product are you using? On what operating system?
GWT-1.5 RC-1
GWExt-2.0.4 
Windows XP

Please provide any additional information below.

Unable to add menu items to menu object. find the code which i am having.

Menu fileMenu = new Menu();
  fileMenu.setShadow(true);
  fileMenu.setMinWidth(10);

  Item excellent = new Item();  //here i am geting exception
  excellent.setText("Excellent");
  fileMenu.addItem(excellent); 

Original issue reported on code.google.com by manjunat...@gmail.com on 1 Jul 2008 at 7:16

GoogleCodeExporter commented 9 years ago
I wan unable to reproduce this problem with a simple test case. A more complete
example that produces this error is needed.

My working test case:
public class Client implements EntryPoint {
    public void onModuleLoad() {
        Menu fileMenu = new Menu();
        fileMenu.setShadow(true);
        fileMenu.setMinWidth(10);

        Item excellent = new Item();  //here i am geting exception
        excellent.setText("Excellent");
        fileMenu.addItem(excellent); 

        Panel panel = new Panel();
        Toolbar toolbar = new Toolbar();
        ToolbarMenuButton button;
        button = new ToolbarMenuButton("File");
        button.setMenu(fileMenu);
        toolbar.addButton(button);
        panel.setTopToolbar(toolbar);
        new Viewport(panel);
    }
}

Original comment by asgill...@gmail.com on 11 Aug 2008 at 12:36