Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » SWT constants do not work
SWT constants do not work [message #865446] Mon, 30 April 2012 12:03 Go to next message
Tobias P. is currently offline Tobias P.Friend
Messages: 43
Registered: April 2012
Member
Hi guys,

i am new to the whole RCP/RAP stuff and i am trying to convert a small RCP application to make it running inside a Web Browser via RAP.

So right now i have problems using something like this:

addListener(SWT.Paint, new Listener()


or this:

private int borderLineStyle = SWT.LINE_SOLID;


I get the error: LINE_SOLID cannot be resolved or is not a field.


Also i can not find an overview what works and what does not. Is there something like this on the web?

If you need additional information feel free to ask.

Thanks in advance.
Re: SWT constants do not work [message #866056 is a reply to message #865446] Mon, 30 April 2012 18:07 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 335
Registered: July 2009
Senior Member
Tobias,

RAP follows the policy that "if it compiles, it will run". Well almost.
The paint events are one of the few exceptions, they are only supported
on Canvas. If the addListener code is used to draw on a Canvas widget,
then converting it its typed pendant (addPaintListener) should do.

Another case are style flags or methods that are marked as "hints" in
the JavaDoc. Like on any other platform they may not be entirely
supported. Most of the exceptions are already discussed in this forum or
in the FAQ. Nonetheless, feel free to ask if you can't find a solution.

There is also a "single-sourcing guide" [1] which might be of interst
for you. It discusses strategies to develop RCP and RAP applications by
using a single code base.

HTH
Rüdiger

[1] http://eclipsesource.com/en/info/rcp-rap-single-sourcing-guideline/

On 30.04.2012 14:03, Tobias Placht wrote:
> Hi guys,
>
> i am new to the whole RCP/RAP stuff and i am trying to convert a small
> RCP application to make it running inside a Web Browser via RAP.
>
> So right now i have problems using something like this:
>
>
> addListener(SWT.Paint, new Listener()
>
>
> or this:
>
> private int borderLineStyle = SWT.LINE_SOLID;
>
> I get the error: LINE_SOLID cannot be resolved or is not a field.
>
>
> Also i can not find an overview what works and what does not. Is there
> something like this on the web?
>
> If you need additional information feel free to ask.
>
> Thanks in advance.
--
Rüdiger Herrmann
http://codeaffine.com
Re: SWT constants do not work [message #866215 is a reply to message #865446] Mon, 30 April 2012 19:55 Go to previous message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi,

sorry, we can't provide a 100% coverage of SWT's drawing API, because
drawing in the browser (especially IE) is limited compared to the
desktop. You can currently only add a typed PaintListener on a Canvas.
SWT.LINE_* styles are also not supported yet.

We decided not to maintain an overview of supported and unsupported API
on the web. If we did, it would probably be outdated most of the time,
either because of additions in SWT or in RAP. If you want to know which
parts of your application use still unsupported API, just switch the
target to RAP and look at the compile errors in the Problems view - this
should pretty much be the overview you need, doesn't it?

Regards, Ralf


--
Ralf Sternberg

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic:Theme not displayed in tomcat
Next Topic:How to configure different plugins inside a war-file
Goto Forum:
  


Current Time: Fri Apr 26 12:09:37 GMT 2024

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

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

Back to the top