Error width MenuBar

GWT Designer allows you to quickly create the modules, composites, panels, remote services and other elements that comprise Google Web Tookit applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Error width MenuBar

Postby chuhan » Fri Apr 13, 2007 1:20 pm

Hi,

I'm getting an error message saying that 'IllegalArgumentException' in Designer. The following is a simplified class definition to show the error.

A weired thing is that the error is thrown only when the lines commented with 'LABEL' and 'CELL WIDTH' exist at the same. Commeting out either of them make Designer work normal.

I also attached the exception stack trace.

Code: Select all
public class Test extends Composite{

   public Test() {
      final HorizontalPanel hpan = new HorizontalPanel();
      initWidget(hpan);
      
      hpan.add(new Label("label goes here"));  // LABEL
      
      MenuBar mbase = new MenuBar();
      hpan.add(mbase);
      hpan.setCellWidth(mbase, "1px");           // CELL WIDTH
      
      MenuBar menuItemBar = new MenuBar();
      
      mbase.addItem("menu item 1", menuItemBar);
      
   }
   
}


Exception message :
Code: Select all
!MESSAGE Designer internal error [6.2.1.20070413074515]: org.apache.commons.lang.exception.NestableError: java.lang.IllegalArgumentException: Argument not valid
!STACK 0
org.apache.commons.lang.exception.NestableError: org.apache.commons.lang.exception.NestableError: java.lang.IllegalArgumentException: Argument not valid
   at com.swtdesigner.model.swing.properties.custom.DesignTimeHelper.execute(DesignTimeHelper.java:56)
   at com.swtdesigner.model.JavaInfo.notifyPropertyChanged(JavaInfo.java:5566)
   at com.swtdesigner.model.JavaInfo.notifyPropertyChanged(JavaInfo.java:5548)
   at com.swtdesigner.gef.common.property.DesignerEditorPropertyComposite.handleRootNodeSelected(DesignerEditorPropertyComposite.java:628)
   at com.swtdesigner.gef.common.property.DesignerEditorPropertyComposite.updatePropertyComposite(DesignerEditorPropertyComposite.java:831)
   at com.swtdesigner.gef.DesignerEditor.parseCompilationUnit(DesignerEditor.java:1128)
   at com.swtdesigner.gef.DesignerEditor$17.execute(DesignerEditor.java:1040)
   at com.swtdesigner.model.swing.properties.custom.DesignTimeHelper.execute(DesignTimeHelper.java:54)
   at com.swtdesigner.gef.DesignerEditor.handleActivate(DesignerEditor.java:1034)
   at com.swtdesigner.gef.DesignerEditor.handleActivate(DesignerEditor.java:1028)
   at com.swtdesigner.editors.MultiPageEditor.showDesignEditor(MultiPageEditor.java:413)
   at com.swtdesigner.editors.MultiPageEditor$2.widgetSelected(MultiPageEditor.java:183)
   at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
   at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:947)
   at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:706)
   at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3205)
   at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1987)
   at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:308)
   at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
   at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3673)
   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3284)
   at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2361)
   at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2325)
   at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200)
   at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
   at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
   at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
   at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
   at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:101)
   at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:359)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:174)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:474)
   at org.eclipse.equinox.launcher.Main.basicRun(Main.java:414)
   at org.eclipse.equinox.launcher.Main.run(Main.java:1139)
Caused by: org.apache.commons.lang.exception.NestableError: java.lang.IllegalArgumentException: Argument not valid
   at com.swtdesigner.gwt.model.widgets.menu.MenuInfo.fetchVisualData(MenuInfo.java:223)
   at com.swtdesigner.gwt.model.widgets.menu.MenuInfo.screenshotComplete(MenuInfo.java:169)
   at com.swtdesigner.model.JavaInfo.screenshotComplete(JavaInfo.java:887)
   at com.swtdesigner.model.JavaInfo.screenshotComplete(JavaInfo.java:887)
   at com.swtdesigner.gwt.model.widgets.menu.MenuInfo.screenshotComplete(MenuInfo.java:166)
   at com.swtdesigner.model.JavaInfo.screenshotComplete(JavaInfo.java:887)
   at com.swtdesigner.model.JavaInfo.screenshotComplete(JavaInfo.java:887)
   at com.swtdesigner.model.JavaInfo$19.execute(JavaInfo.java:5575)
   at com.swtdesigner.model.swing.properties.custom.DesignTimeHelper.execute(DesignTimeHelper.java:54)
   ... 44 more
Caused by: java.lang.IllegalArgumentException: Argument not valid
   at org.eclipse.swt.SWT.error(SWT.java:3518)
   at org.eclipse.swt.SWT.error(SWT.java:3457)
   at org.eclipse.swt.SWT.error(SWT.java:3428)
   at org.eclipse.swt.graphics.GC.drawBitmap(GC.java:1047)
   at org.eclipse.swt.graphics.GC.drawImage(GC.java:909)
   at org.eclipse.swt.graphics.GC.drawImage(GC.java:847)
   at com.swtdesigner.gwt.model.widgets.menu.MenuInfo.fetchVisualData(MenuInfo.java:208)
   ... 52 more
chuhan
 
Posts: 28
Joined: Tue Nov 14, 2006 3:28 pm

Re: Error width MenuBar

Postby Eric Clayberg » Mon Apr 16, 2007 9:36 am

Give this a try in the latest build.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 3 guests