click 'design' - argument cannot be null

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

click 'design' - argument cannot be null

Postby pmoore » Wed Aug 13, 2003 7:53 am

I have a simpel form. I could edit it for a bit, now when I try to open it in the designer I get this popup.
Here is log

!MESSAGE Designer internal error: Argument cannot be null
!STACK 0
java.lang.IllegalArgumentException: Argument cannot be null
at org.eclipse.swt.SWT.error(SWT.java:2318)
at org.eclipse.swt.SWT.error(SWT.java:2262)
at org.eclipse.swt.widgets.Widget.error(Widget.java:385)
at org.eclipse.swt.widgets.Widget.checkParent(Widget.java:254)
at org.eclipse.swt.widgets.Widget.<init>(Widget.java:144)
at org.eclipse.swt.widgets.Control.<init>(Control.java:93)
at org.eclipse.swt.widgets.Scrollable.<init>(Scrollable.java:72)
at org.eclipse.swt.widgets.Composite.<init>(Composite.java:85)
at org.eclipse.swt.widgets.Table.<init>(Table.java:90)
at com.swtdesigner.model.widgets.controls.complex.h.a(Unknown Source)
at com.swtdesigner.model.widgets.controls.j.b(Unknown Source)
at com.swtdesigner.model.widgets.composites.d.b(Unknown Source)
at com.swtdesigner.model.widgets.composites.d.h(Unknown Source)
at com.swtdesigner.gef.m.a(Unknown Source)
at com.swtdesigner.gef.l.selectionChanged(Unknown Source)
at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:159)
at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1006)
at org.eclipse.core.runtime.Platform.run(Platform.java:413)
at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:157)
at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1290)
at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1020)
at org.eclipse.jface.viewers.Viewer.setSelection(Viewer.java:362)
at com.swtdesigner.gef.m.a(Unknown Source)
at com.swtdesigner.editors.MultiPageEditor.d(Unknown Source)
at com.swtdesigner.editors.a.widgetSelected(Unknown Source)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:865)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:849)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:656)
at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:1744)
at org.eclipse.swt.custom.CTabFolder.onMouseDown(CTabFolder.java:1912)
at org.eclipse.swt.custom.CTabFolder.access$4(CTabFolder.java:1904)
at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:201)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1838)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1545)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402)
at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:858)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
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.core.launcher.Main.basicRun(Main.java:291)
at org.eclipse.core.launcher.Main.run(Main.java:747)
at org.eclipse.core.launcher.Main.main(Main.java:583)
pmoore
 
Posts: 1
Joined: Wed Aug 13, 2003 7:49 am

Postby asamoal » Wed Aug 13, 2003 1:07 pm

Hello there strange you have just posted the message I had intended to post a while ago!(not more than 1hr !)

OK, I have noticed that one gets such errors when one puts or assosiates the wrong objects/control with certain parents. In my case whilst trying to create a popup control it attached itself to the menuitem control and that produced this error.

I hope that helps.
//Leslie
asamoal
 
Posts: 24
Joined: Wed Aug 13, 2003 2:56 am
Location: Finland

Re: click 'design' - argument cannot be null

Postby admin » Wed Aug 13, 2003 7:22 pm

pmoore wrote:I have a simpel form. I could edit it for a bit, now when I try to open it in the designer I get this popup.
Here is log

Please post source code of this form.
admin
Moderator
 
Posts: 166
Joined: Thu Jul 24, 2003 12:25 am

Postby cebarne2 » Thu Oct 02, 2003 8:43 am

I also get this error. I believe the offending source code is for a combo box (in my case):

cmbsynplify.setItems( ToolPaths.propertyToArray(myProject.getPersistentProperty(new QualifiedName("VHDLDevelopmentTools", "SynplifyPaths"))));

Basically:

ToolPaths.propertyToArray(myProject.getPersistentProperty(new QualifiedName("VHDLDevelopmentTools", "SynplifyPaths")))

Will return a string array at runtime. Is the designer interpreting this as null?

Thanks,
Chad
cebarne2
 
Posts: 67
Joined: Tue Sep 23, 2003 10:11 am
Location: Cedar Rapids, IA

Postby admin » Fri Oct 03, 2003 1:37 am

Thank you, Chad.
Once you published offending source code, this allows us to identify problem. We have bug in String[] parsing. If there is call for Combo.setItems() call, and call to method is used, code parser returns null as result, instead of empty string array. So, SWT complains that argument can not be null. I've fixed this bug, so in future version you will not receive it again. For now, try to move code for setting items to separate method.
admin
Moderator
 
Posts: 166
Joined: Thu Jul 24, 2003 12:25 am

Very impressed with tool and support

Postby cebarne2 » Fri Oct 03, 2003 4:52 am

Thank you for the quick turn-around on these questions and requests. Since using this tool, I have been very impressed by both its functionality, and your willingness to fix, enhance, or add functionality as reported by the user community.

I believe the recent acquisition by Instantiations is only further proof that I am not the only one impressed by SWT-Designer and its creator.

I will be recommending this tool to other Eclipse developers in our company as we continue our promotion and rollout of Eclipse to the Enterprise.
cebarne2
 
Posts: 67
Joined: Tue Sep 23, 2003 10:11 am
Location: Cedar Rapids, IA


Return to SWT Designer

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 1 guest