Hi all,

I'm just getting started with GWT, and I'm wondering whether or not a
particular scenario is possible. I would like to take an application
that has been written on top of a native Java GUI library like SWT,
and throw the unmodified source code (without even changing the import
statements) into GWT, and have it return a working JavaScript web
application. Now, obviously GWT doesn't support SWT on its own, and it
also cannot compile SWT down to JavaScript. So, what I would imagine
doing is creating a SWT-compatible library on top of GWT, mapping API
calls onto either GWT widget API's, or some native JavaScript widget
library (like ExtJS or Dijit) using JSNI. But I imagine this SWT-
compatible library would need to live in its own package, distinct
from the SWT package, and thus, in order to use the SWT-compatible
classes from this library, you would at least need to change the
import statements when you compile the application's source code. Does
GWT provide a mechanism for this, so that you can substitute custom
libraries for native ones, without changing the import statements in
the source?

If I were programming in C or C++, I believe this would be
accomplished using ifdef macro preprocessing and sending flags to the
compiler (#ifdef GWT import foo; #ifndef GWT import bar;). Perhaps GWT
has a mechanism for this kind of pattern?

Please let me know. Thanks,

Jake
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to