Re: [Xswt-developer] XSWT Embedding error
Brought to you by:
dvorme
|
From: David J. O. <dj...@co...> - 2006-10-21 05:41:10
|
Hi Olivier,=20
Yeah, that's the 1.0 API. We had to change it in 1.5 to fix a couple of obs=
cure but sometimes nasty bugs.=20
I'm sorry for the confusion. I'm working franticly to clear my plate so I c=
an get back to working on shipping the next version of this thing. :-)=20
Best regards,=20
Dave Orme=20
----- Original Message -----=20
From: Olivier Parisy <ml....@fr...>=20
To: xsw...@li...=20
Sent: Friday, October 20, 2006 3:21:07 PM GMT-0600=20
Subject: Re: [Xswt-developer] XSWT Embedding error=20
David,=20
Thank to your detailed walk through, I've been able to fix my problem.=20
I was hinted by the difference in API: you are using the=20
XSWT.create(flux).parse(shell) call, while I was using the=20
XSWT.create(shell, flux) one.=20
It turned out that I did not use the plugin xswt.jar archive, but=20
another jar I probably downloaded somewhere on sourceforge. Using the=20
plugin jar lead to the calling convention change and to a working piece=20
of code. Did I use an old jar using an obsolete xswt syntax or something=20
similar?=20
Thanks anyway for your involvement.=20
Regards,=20
Olivier Parisy.=20
David J. Orme a =C3=A9crit :=20
> Apologies for the delay at getting back to you. I forgot I was going=20
> to be out of town for the weekend. :-( But I've had a chance to try=20
> your example. My results follow:=20
>=20
> I created a new Plug-in project, added XSWT and SWT as dependencies,=20
> created a "com.cps.test" package, and copied XSWTTest from the=20
> com.swtworkbench.community.xswt.examples.newsyntax package of the XSWT=20
> plugin into the new project. For reference, this is the code I copied=20
> into the project:=20
>=20
> public class XSWTTest {=20
>=20
> public static void main(String[] args) throws IOException {=20
> Display display =3D new Display();=20
> Shell shell =3D new Shell(display);=20
> Map results =3D null;=20
>=20
> try {=20
> results =3D=20
> XSWT.create(XSWTTest.class.getResourceAsStream("Test.xswt"))=20
> .parse(shell);=20
> } catch (XSWTException e) {=20
> Logger.log().error(e, "Unable to parse XSWT file");=20
> }=20
>=20
> shell.setSize(600, 600);=20
> shell.open();=20
> while (!shell.isDisposed()) {=20
> if (!display.readAndDispatch())=20
> display.sleep();=20
> }=20
> display.dispose();=20
> }=20
> }=20
>=20
> I created an XSWT file named Test.xswt with your XSWT code right next=20
> to the XSWTTest.java class. Then I right-clicked XSWTTest.java, chose=20
> "Run as > SWT Application" from the menu, and it worked fine.=20
>=20
> Hopefully, this is enough to get you running again too.=20
>=20
> You can do it using a regular Java project too, but then you have to=20
> manually add the SWT libraries to the classpath, and so on.=20
>=20
> Please let me know if you can't get it going and I'll try to help.=20
>=20
>=20
> Best regards,=20
>=20
> Dave Orme=20
-------------------------------------------------------------------------=
=20
Using Tomcat but need to do more? Need to support web services, security?=
=20
Get stuff done quickly with pre-integrated technology to make your job easi=
er=20
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo=
=20
http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D1=
21642=20
_______________________________________________=20
Xswt-developer mailing list=20
Xsw...@li...=20
https://lists.sourceforge.net/lists/listinfo/xswt-developer=20
|