JFace Dialog - get ClassCastException when opening a JFace Dialog from a RCP application [message #334662] |
Mon, 23 February 2009 16:36  |
Eclipse User |
|
|
|
Originally posted by: james.towers.siemens.com
I am trying to create a simple test case that shows a strange AIX only
problem we are getting in our RCP application (I will post the AIX
question in a separate post). In my Application class I create and open
a dialog that extends JFace dialog. In the configureShell() method
I call super.configureShell() and set the title. The Shell gets a
GridLayout from the super. In the createDialogArea() method I create a
new Composite to hold my Controls. I give this new Composite a
FormLayout...the added controls have FormData. When I open our dialog I
get the ClassCastException...below is a snippet of the exception that
originates from dlg.open().
Is it incorrect to have a GridLayout() on the Shell and a FormLayout()
for the DialogArea?
Thanks and regards,
Jim
java.lang.ClassCastException: org.eclipse.swt.layout.FormData
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:201 )
at org.eclipse.swt.layout.GridLayout.computeSize(GridLayout.jav a:159)
at org.eclipse.swt.widgets.Composite.computeSize(Composite.java :219)
at org.eclipse.swt.layout.GridData.computeSize(GridData.java:47 8)
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:214 )
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04891 seconds