Composite consructor throws IllegalArgumentException on a non-null argument [message #534115] |
Tue, 18 May 2010 07:03 |
Alexey Romanov Messages: 263 Registered: May 2010 |
Senior Member |
|
|
This piece of code (in Scala)
val contents = {
assert(mainWindow.detailsPane != null)
new Composite(mainWindow.detailsPane, SWT.NONE)
}
throws an exception:
Exception occurred
java.lang.IllegalArgumentException: Argument not valid
at org.eclipse.swt.SWT.error(Unknown Source)
at org.eclipse.swt.SWT.error(Unknown Source)
at org.eclipse.swt.SWT.error(Unknown Source)
at org.eclipse.swt.widgets.Widget.error(Unknown Source)
at org.eclipse.swt.widgets.Widget.checkParent(Unknown Source)
at org.eclipse.swt.widgets.Widget.<init>(Unknown Source)
at org.eclipse.swt.widgets.Control.<init>(Unknown Source)
at org.eclipse.swt.widgets.Scrollable.<init>(Unknown Source)
at org.eclipse.swt.widgets.Composite.<init>(Unknown Source)
at main.scala.NodeViewPresenter$NodeViewImpl.<init>(NodeViewPresenter.scala:41)
According to the documentation, IllegalArgumentException should only be thrown when the parent is null, but I am checking for that. detailsPane is a CTabFolder. (As I understand from examples, the controls I want to set as contents of CTabItem should be children of the CTabFolder.) Can anybody say why this could happen?
[Updated on: Tue, 18 May 2010 07:09] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03186 seconds