Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » custom GUI component error!
custom GUI component error! [message #891731] Mon, 25 June 2012 16:16 Go to next message
Boy D'Poy is currently offline Boy D'PoyFriend
Messages: 56
Registered: October 2011
Member
Hi all!

I'm trying to wrap an SWT Control (in my case a simple Button, that I will replace later when everything will be OK) when trying to create a custom GUI component.

Unfortunately everything seems okay untill I encounter the following problem with the function protected void initializeUi in RwtScoutControlField :

!ENTRY org.eclipse.scout.rt.ui.rap 4 0 2012-06-25 18:07:53.148
!MESSAGE org.eclipse.scout.rt.ui.rap.FormFieldFactory.createUiFormFieldByExtension(FormFieldFactory.java:157) could not create form field for: [model = '[*****]client.ui.forms.SiteForm$MainBox$SplitField$MapBox'; ui = 'DirectLinkFactory to: [*****][*****].ui.rap.controlfield.RwtScoutControlField'].
!STACK 0
java.lang.VerifyError: Bad type on operand stack in method [*****][*****].ui.rap.controlfield.RwtScoutControlField.initializeUi(Lorg/eclipse/swt/widgets/Composite;)V at offset 24
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404)
at java.lang.Class.getConstructor0(Class.java:2714)
at java.lang.Class.newInstance0(Class.java:343)
at java.lang.Class.newInstance(Class.java:325)
at org.eclipse.scout.rt.ui.rap.FormFieldFactory$P_DirectLinkFormFieldFactory.createUiFormField(FormFieldFactory.java:184)
at org.eclipse.scout.rt.ui.rap.FormFieldFactory.createUiFormFieldByExtension(FormFieldFactory.java:154)
at org.eclipse.scout.rt.ui.rap.FormFieldFactory.createUiFormField(FormFieldFactory.java:143)
at org.eclipse.scout.rt.ui.rap.AbstractRwtEnvironment.createFormField(AbstractRwtEnvironment.java:1332)
at org.eclipse.scout.rt.ui.rap.form.fields.splitbox.RwtScoutSplitBox.initializeUi(RwtScoutSplitBox.java:42)
at org.eclipse.scout.rt.ui.rap.basic.RwtScoutComposite.createUiField(RwtScoutComposite.java:140)
at org.eclipse.scout.rt.ui.rap.FormFieldFactory$P_DirectLinkFormFieldFactory.createUiFormField(FormFieldFactory.java:185)
at org.eclipse.scout.rt.ui.rap.FormFieldFactory.createUiFormFieldByExtension(FormFieldFactory.java:154)
at org.eclipse.scout.rt.ui.rap.FormFieldFactory.createUiFormField(FormFieldFactory.java:143)
at org.eclipse.scout.rt.ui.rap.AbstractRwtEnvironment.createFormField(AbstractRwtEnvironment.java:1332)
at org.eclipse.scout.rt.ui.rap.form.fields.groupbox.RwtScoutGroupBox.initializeUi(RwtScoutGroupBox.java:116)
at org.eclipse.scout.rt.ui.rap.basic.RwtScoutComposite.createUiField(RwtScoutComposite.java:140)
at org.eclipse.scout.rt.ui.rap.FormFieldFactory$P_DirectLinkFormFieldFactory.createUiFormField(FormFieldFactory.java:185)
at org.eclipse.scout.rt.ui.rap.FormFieldFactory.createUiFormFieldByExtension(FormFieldFactory.java:154)
at org.eclipse.scout.rt.ui.rap.FormFieldFactory.createUiFormField(FormFieldFactory.java:143)
at org.eclipse.scout.rt.ui.rap.AbstractRwtEnvironment.createFormField(AbstractRwtEnvironment.java:1332)
at org.eclipse.scout.rt.ui.rap.form.RwtScoutForm.initializeUi(RwtScoutForm.java:52)
at org.eclipse.scout.rt.ui.rap.basic.RwtScoutComposite.createUiField(RwtScoutComposite.java:140)
at org.eclipse.scout.rt.ui.rap.AbstractRwtEnvironment.createForm(AbstractRwtEnvironment.java:1323)
at org.eclipse.scout.rt.ui.rap.window.desktop.RwtScoutDesktopForm.createPart(RwtScoutDesktopForm.java:61)
at org.eclipse.scout.rt.ui.rap.window.desktop.RwtScoutViewStack.addForm(RwtScoutViewStack.java:131)
at org.eclipse.scout.rt.ui.rap.window.desktop.RwtScoutDesktop.addForm(RwtScoutDesktop.java:128)
at org.eclipse.scout.rt.ui.rap.AbstractStandaloneRwtEnvironment.showFormPart(AbstractStandaloneRwtEnvironment.java:219)
at org.eclipse.scout.rt.ui.rap.AbstractRwtEnvironment$P_ScoutDesktopListener$1.run(AbstractRwtEnvironment.java:1105)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:38)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:179)
at org.eclipse.swt.widgets.Display.runPendingMessages(Display.java:1148)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1135)
at org.eclipse.scout.rt.ui.rap.AbstractStandaloneRwtEnvironment.createUI(AbstractStandaloneRwtEnvironment.java:148)
at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWTLifeCycle.java:177)
at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadController.run(RWTLifeCycle.java:289)
at java.lang.Thread.run(Thread.java:722)
at org.eclipse.rwt.internal.lifecycle.UIThread.run(UIThread.java:102)



I've attached all my source code.

What's wrong, and I could I solve this?

Thank You!
  • Attachment: custom.zip
    (Size: 4.88KB, Downloaded 96 times)


Once You Go Scout, You Never Come Out!
Re: custom GUI component error! [message #891814 is a reply to message #891731] Tue, 26 June 2012 06:33 Go to previous messageGo to next message
Stephan Leicht Vogt is currently offline Stephan Leicht VogtFriend
Messages: 102
Registered: February 2010
Location: Baden Switzerland
Senior Member

Hi

As I saw in your code you used SWT classes in your client(-model-)code. This is wrong. SWT classes belong only into ui-plugins such as my.application.ui.swt or .rwt and never in model-plugins such as my.application.client. If your code depends on keeping a widget instance in the model you'd have to take an Object field.

But why don't you insert a button into the form with getConfiguredVisible()->false and set it visible later when everything is OK?

Greetings Stephan
Re: custom GUI component error! [message #891819 is a reply to message #891814] Tue, 26 June 2012 07:02 Go to previous messageGo to next message
Ivan Motsch is currently offline Ivan MotschFriend
Messages: 100
Registered: March 2010
Senior Member
Hi,

did this answer help you?
Do you need any more help or code samples?
Re: custom GUI component error! [message #891832 is a reply to message #891819] Tue, 26 June 2012 08:27 Go to previous messageGo to next message
Boy D'Poy is currently offline Boy D'PoyFriend
Messages: 56
Registered: October 2011
Member
Ok, I learnt by this answer, that SWT components should'nt be used in client area, that's right.

But the Button widget I used was just as an example of SWT component in the client area. It might be replaced by another component witch doesn't belongs to SWT API. I dealt with Button only for simplification, so that, the answer helped me to learn more, but did not solve the problem. Sad

More samples or tutorial would be graceful Smile especialy for ui.rap.
For example embedding Google Maps Widget for (SWT and) RAP from eclipsesource in a sample Form?

Thanks.


Once You Go Scout, You Never Come Out!
Re: custom GUI component error! [message #892006 is a reply to message #891731] Tue, 26 June 2012 19:52 Go to previous message
Claudio Guglielmo is currently offline Claudio GuglielmoFriend
Messages: 128
Registered: March 2010
Senior Member
Hi boy

Have you tried the tutorial at http://wiki.eclipse.org/Scout/HowTo/3.7/Add_a_custom_GUI_component ? This works for SWT and RWT as well.

Regards
Claudio

Previous Topic:[SWT/RAP] No Toolbar / Outlinebar (Juno RC3)
Next Topic:Menu in a dialog
Goto Forum:
  


Current Time: Mon Nov 24 16:26:12 GMT 2014

Powered by FUDForum. Page generated in 0.18815 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software