SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.
Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg
by tanukitzu » Tue Mar 08, 2005 12:22 pm
After installing Designer, I created a new "SWT JFace Java Project" and then created a new class through the menu new->designer->examples->Multi Controls ->Menu.
The example fails to run with the following error:
Exception in thread "main" java.lang.IllegalArgumentException: Menu must be a drop down
at org.eclipse.swt.SWT.error(SWT.java:2677)
at org.eclipse.swt.SWT.error(SWT.java:2616)
at org.eclipse.swt.SWT.error(SWT.java:2587)
at org.eclipse.swt.widgets.Widget.error(Widget.java:376)
at org.eclipse.swt.widgets.MenuItem.setMenu(MenuItem.java:663)
at menusExample.main(menusExample.java:120)
Any help is appreciated.
-
tanukitzu
-
- Posts: 2
- Joined: Tue Mar 08, 2005 12:15 pm
by Eric Clayberg » Tue Mar 08, 2005 2:23 pm
tanukitzu wrote:After installing Designer, I created a new "SWT JFace Java Project" and then created a new class through the menu new->designer->examples->Multi Controls ->Menu.
The was a bug in the Menu example template. You can either change the line...
cascadeItem.setMenu(popupmenu);
to...
cascadeItem.setMenu(cascademenu);
or download the latest v3.0.1 build and create the example again (the template is corrected in 3.0.1).
-
Eric Clayberg
- Moderator
-
- Posts: 4503
- Joined: Tue Sep 30, 2003 6:39 am
- Location: Boston, MA USA
-
by tanukitzu » Fri Mar 11, 2005 11:23 am
With those the changes the example compiles and runs, but the menubar doesn't display properly in GTK.
-
tanukitzu
-
- Posts: 2
- Joined: Tue Mar 08, 2005 12:15 pm
by Eric Clayberg » Mon Mar 14, 2005 3:50 pm
tanukitzu wrote:With those the changes the example compiles and runs, but the menubar doesn't display properly in GTK.
Seems to work fine for me using Eclipse 3.1 M5...
Can you post the exact source for your example so I can compare it to what I have?
-
Eric Clayberg
- Moderator
-
- Posts: 4503
- Joined: Tue Sep 30, 2003 6:39 am
- Location: Boston, MA USA
-
Return to SWT Designer
Who is online
Users browsing this forum: No registered users and 1 guest