Re: GST 2.8 Keyboard Handler Question

2017-02-02 Thread Thomas Broyer


On Wednesday, February 1, 2017 at 8:33:43 PM UTC+1, Ed wrote:
>
> @Thomas
>
> I cant find the cancel event in the docs. I found javadoc for 2.7 not 2.8
>

That'd be preventDefault()
http://www.gwtproject.org/javadoc/latest/com/google/gwt/event/dom/client/DomEvent.html#preventDefault()

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


GST 2.8 Keyboard Handler Question

2017-02-01 Thread Thomas Broyer
Have you tried cancelling the event?

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Drag and Drop in GWT

2017-01-28 Thread Thomas Broyer
Drag and drop is in GWT proper (DropEvent et al)

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT 2.7: access public static final field in JSNI results as undefined in SuperDevMode

2017-01-27 Thread Thomas Broyer
I would say it's a bug (have you tried in 2.8, maybe it's fixed?).
I'd also say one should try to keep JSNI as small as possible; your method 
could be rewritten as:
public static void doSomethingWithMarker() {
  nativeDoSomethingWithMarker(SPECIAL_MARKER);
}
private static native void nativeDoSomethingWithMarker(String cm) /*-{
  $wnd.alert(cm);
}-*/;

In legacy devmode, JSNI boundaries used to be a performance issue, but this 
is no longer the case with SuperDevMode, so there's no reason to write big 
JSNI methods (or even JSNI at all: use JsInterop; there are still a few 
cases that need JSNI, but one can do almost everything with JsInterop 
nowadays).

On Friday, January 27, 2017 at 11:23:35 AM UTC+1, Norbert Bartels wrote:
>
> Hi all,
>
> during development I ran into a problem and I had to dig a bit deeper to 
> find the root cause. Perhaps someone can explain why this happens.
>
> I use GWT 2.7. And I have a class with some constants. For example 
> something like this:
>
> public class MyConstants {
>
>   public static final String SPECIAL_MARKER = "marker";
>
> }
>
> Now I try to use this in a JSNI method in another class, for example in 
> this way:
>
> ...
> public static native void doSomethingWithMarker() /*-{
>var cm = @my.package.MyConstants::SPECIAL_MARKER 
>$wnd.alert(cm);
> }-*/;
>
> ...
>
> In classic dev mode and in the compiled version this is working. In 
> SuperDevMode cm is undefined. 
>
> Now, I remove the final and voila, it even works in SuperDevMode.
> So obviously the final is a problem. But why is it working in classic and 
> compiled mode? Is this simply a bug or is there a better way to use such 
> constants?
>
> Cheers,
> Norbert
> ​
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT/Maven: No source code is available for type junit.framework.Test; did you forget to inherit a required module?

2017-01-27 Thread Thomas Broyer


On Friday, January 27, 2017 at 4:07:16 AM UTC+1, Magnus wrote:
>
> Hello Thomas,
>
> I solved the actual problem by removing the Maven generated AppTest.java 
> from the src/test/ path.
> However, my further plans are concerned by what you mentioned below:
>
> GWT doesn't care about folders, it reads resources from the classpath.
>>>
>>> But then I don't really understand the sense of the *.gwt.xml files, 
>>> which explicitely include source folders.
>>>
>> No, they subset the classpath by defining subpackages, independently of 
>> where they come from (and they sort-of superset the classpath with 
>> super-source too).
>> Still, classpath/classloader based, not file/folder based.
>>
>
> This means that the GWT compiler "sees" everything on the classpath, 
> wether some subfolder is included as source code in some *.gwt.xml files or 
> not.
>
> At the moment, I have separate libraries, one for pure Java code and one 
> for GWT-based Java code. I already thought about moving them into one 
> library, where one subfolder contains the GWT-related code.
> For this one "GWT-folder", this would mean:
>
>- Only the GWT-folder must be seen by the GWT-compiler, since the 
>other code may not compile with it.
>- Only for the GWT-folder, the corresponding source code must be 
>included into the library jar file.
>
> Until now I thought I can do that by placing a *.gwt.xml file only for the 
> GWT-folder, so that all other folders are simply not existing from the 
> GWT's point of view.
> But if I understand you right, all other folders would be included by the 
> GWT-compiler, too. And I don't want to fix this by having special run 
> configurations for all my applications.
> The optimal solution for me would be: Include a single jar in an 
> application project, and have both the pure Java libraries and the 
> GWT-related libraries present in the application.
>
> Can I do this or must I keep the both libraries separated?
>

You can totally do that, specifically because .gwt.xml files subset the 
classpath.

Recap:
1. GWT reads from the classpath, it doesn't care where the files 
"physically" are: this means if your classpath is 
src/main/java:target/classes:/path/to/gwt-user.jar:/path/to/gwt-dev.jar, 
you can have target/classes/myapp/MyApp.gwt.xml (in a typical Maven setup, 
copied there from src/main/resources/myapp/MyAp.gwt.xml) that references 
src/main/java/myapp/MyApp.java as simply "myapp.MyApp": GWT doesn't care 
whether that myapp/MyApp.java actually leaves in src/main/java, 
target/classes, some JAR, etc.
2. gwt.xml files subset the classpath for GWT: by default, a gwt.xml has an 
implicit , so putting a .gwt.xml file in a package 
and referencing it from another .gwt.xml (or passing it as the input to 
GWT) will tell GWT to only consider classes (in the form of *.java 
resources) in the "client" subpackage. A typical setup would put non-GWT 
classes in a "server" subpackage, and GWT generators into a "rebind" 
subpackage; GWT will then ignore them because they're not in the "source 
path" (which only includes the "client" subpackage here).
3. gwt.xml files can also "superset" the classpath by "rerooting" some 
subpackages, through super-source. If a .gwt.xml contains , the GWT will behave as if that "super" subpackage was added 
to the classpath (note that again this is about packages, whereas the 
classpath is defined in terms of folders and jar files; what that means is 
that if myapp/MyApp.gwt.xml from the above example had , then GWT would behave as if the classpath were 
src/main/java/myapp/super:target/classes/myapp/super:src/main/java:target/classes::/path/to/gwt-user.jar::/path/to/gwt-dev.jar: – well 
actually, the precedence rules are a bit different IIRC, but you get the 
idea)
4. the  and  (and  by the way) can further 
subset things by using includes="", excludes="" and skip="" attributes, or 
,  and  child elements (the difference between 
exclude and skip: skip means "not in this module, but another module 
–generally in the same package– could include it", whereas exclude means 
"never include this, even if another module –generally in the same package– 
would include it"; of course it only works that way if both modules are 
)

Have a look inside gwt-user.jar to understand all that: in one JAR there's 
client-side code, server-side code, shared client/server code, super-source 
code; and you can find further subsetting (using include/exclude/skip) in 
some .gwt.xml files in com/google/gwt/user.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT/Maven: No source code is available for type junit.framework.Test; did you forget to inherit a required module?

2017-01-26 Thread Thomas Broyer


On Thursday, January 26, 2017 at 5:26:21 PM UTC+1, Magnus wrote:
>
> Hello Thomas!
>
> > I'd suggest getting Maven to work before Eclipse
>
> Let me explain this:
> I am in the middle of a migration of my code towards Maven. Before this, I 
> had this situation:
>
>- a pure java library (lib-java)
>- a GWT-based java library (lib-gwt)
>- several applications which use both libraries (lib-java and lib-gwt)
>
> In the first steps, I moved the two libraries to Maven. They compile fine 
> and the target jar's are build.
> The applications are still based on the GWT-plugin for eclipse, i. e. 
> non-Maven projects.
>
> GWT doesn't care about folders, it reads resources from the classpath.
>
>
> But then I don't really understand the sense of the *.gwt.xml files, which 
> explicitely include source folders.
>

No, they subset the classpath by defining subpackages, independently of 
where they come from (and they sort-of superset the classpath with 
super-source too).
Still, classpath/classloader based, not file/folder based.
 

> That said, a properly configured Eclipse+Maven+GWT project should 
>> configure GWT tasks to only include src/main/java.
>
>
> How do I do that, while the application is still outsife of Maven?
> (In eclipse I can only select dependend projects.)
>

In the launch configuration, you should be able to tweak the classpath 
manually to remove the src/test/java entry (which should be independent 
from the "dependent projects")

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: [WARN] Namespace option is not compatible with CodeSplitter, turning it off.

2017-01-26 Thread Thomas Broyer


On Thursday, January 26, 2017 at 4:01:59 PM UTC+1, Jens wrote:
>
> The GWT compiler has a namespace option (-Xnamespace) you can turn on 
> during compilation. But turning it on can produce bugs, especially when 
> using code splitting so this option has been deactivated for now.
>
> The reasoning why this change has been made can be read in the code 
> review: https://gwt-review.googlesource.com/#/c/13704/
>
> If you don't want to see the warning anymore, remove the compiler option.
>

But note that the default value for -Xnamespace is PACKAGE when using 
-draftCompile (and NONE otherwise), so if you're using -draftCompile and 
don't want to see the warning, then pass an explicit "-Xnamespace NONE".

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT/Maven: No source code is available for type junit.framework.Test; did you forget to inherit a required module?

2017-01-25 Thread Thomas Broyer
GWT doesn't care about folders, it reads resources from the classpath. And 
Eclipse does not have notions of "main" and test classpaths, so src/test/java 
is added to the classpath just like src/main/java. That said, a properly 
configured Eclipse+Maven+GWT project should configure GWT tasks to only include 
src/main/java. Things should also Just Work™ with Maven (I'd suggest getting 
Maven to work before Eclipse)

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Geolocation problems

2017-01-25 Thread Thomas Broyer


On Wednesday, January 25, 2017 at 11:56:20 AM UTC+1, Paul wrote:
>
> See 
> http://www.gwtproject.org/javadoc/latest/com/google/gwt/geolocation/client/Position.Coordinates.html
>
> Several methods return Double e.g.
>
> public Double getSpeed()
>
> The JavaScript object overlay that implements this method is...
>
> @Override
> public final native Double getSpeed() /*-{
>   return this.speed || null;
> }-*/;
>
>
> However this.speed is a primitive double or null according to ...
>
> https://developer.mozilla.org/en-US/docs/Web/API/Coordinates 
> 
>
> So surely this is incorrect?
>

In GWT 2.7.0 and earlier, returning a JS Number as a java.lang.Double would 
be an error; but in GWT 2.8.0 java.lang.Double and double are 
interchangeable (same for java.lang.Boolean and boolean). This was actually 
reported 2 years ago: https://github.com/gwtproject/gwt/issues/9058
It is however probably incorrect to turn a 0 value into a null yes.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: [WARN] Lost communication with remote process ?

2017-01-24 Thread Thomas Broyer
A quick look at the code reveals that after the exception is logged 
,
 
a TransientWorkerException 

 
is thrown, and a TransientWorkerException means that compilation on a given 
worker has failed and should be retried in another worker.
This explains why it works in the end.

Now as to why the external worker seemingly closed the connection, possibly 
an OufOfMemory.
You can enable debug logging to get the stdout and stderr of the forked JVM.
Then try playing with the gwt.jjs.javaArgs system properties to tune the 
forked JVM (memory if it's a memory issue).
Or you could possibly simply use fewer workers.

On Tuesday, January 24, 2017 at 4:01:47 PM UTC+1, Ed wrote:
>
> Anybody any idea what to do with the following error:
> I haven't seen this before, I see it since GWT 2.8. It occurs sometimes 
> between permutation 15-16 and sometimes between 11-12 like the exception 
> below.
> However, it ends with success, strange, and the application does work.
>
> I receive it when it's been build by Jenkins.
> Any idea what it is and how to solve it ?
>
> - Ed
>
> ---
>
> [INFO] Compiling permutation 10...
> [INFO]  Compiling
> [INFO] Compiling permutation 11...
> [INFO]   [WARN] Lost communication with remote process
> [INFO] java.io.EOFException
> [INFO]at 
> java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2601)
> [INFO]at 
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1319)
> [INFO]at 
> java.io.ObjectInputStream.readObject(ObjectInputStream.java:371)
> [INFO]at 
> com.google.gwt.dev.ExternalPermutationWorkerFactory$ExternalPermutationWorker.compile(ExternalPermutationWorkerFactory.java:154)
> [INFO]at 
> com.google.gwt.dev.PermutationWorkerFactory$Manager$WorkerThread.run(PermutationWorkerFactory.java:74)
> [INFO]at java.lang.Thread.run(Thread.java:745)
> [INFO]   Compiling permutation 12...
> [INFO]  Compiling
> [INFO] Compiling permutation 13...
> [INFO]   Compiling permutation 14...
> [INFO]  Compiling
> [INFO] Compiling permutation 15...
> [INFO]   Compiling permutation 16...
> [INFO]  Compiling
> [INFO] Compiling permutation 17...
> [INFO]   Compiling permutation 18...
> [INFO]  Compiling
> [INFO] Compiling permutation 10...
> [INFO]Compile of permutations succeeded
> [INFO]Compilation succeeded -- 866.139s
> [INFO] Linking into /home/develop/gwt/work/prod/total/plus
> [INFO]Link succeeded
> [INFO]Linking succeeded -- 14.454s
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Only Getting 1 Header from Response (newbie)

2017-01-23 Thread Thomas Broyer
The Access-Control-Expose-Headers response header only allows Content-Type to 
go through (other whitelisted headers are not present in response)

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Super Dev Mode stopped working in Chrome

2017-01-12 Thread Thomas Broyer
You may want to try out https://github.com/tbroyer/gwt-devserver

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Problems with RequestBuilder

2017-01-12 Thread Thomas Broyer
It looks like you have a cross-origin issue (localhost: vs localhost:8080), 
and CORS would help.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Error 404 while download gwt chrome plugin

2017-01-08 Thread Thomas Broyer


On Sunday, January 8, 2017 at 4:44:05 PM UTC+1, Thomas Broyer wrote:
>
> What that means is we need to update the missing-plugin page; though 
> nowadays I don't think it works in many browsers… (very old Firefox, and 
> maybe IE: no Chrome, no Safari, no Edge, no recent Firefox)
>

FWIW, https://github.com/gwtproject/gwt-site/pull/217 

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Error 404 while download gwt chrome plugin

2017-01-08 Thread Thomas Broyer


On Sunday, January 8, 2017 at 4:39:02 PM UTC+1, Silvio Domingos wrote:
>
> Hi everyone,
>
> I'm trying to download the gwt plugin to chrome. however i always got 404 
> error  using the url http://www.gwtproject.org/missing-plugin/
> Is it happening with everyone or only me?
>

It's not just you, but it's not unexpected: plugins have been disabled in 
Chrome for a while, and forbidden within extensions too.
What that means is we need to update the missing-plugin page; though 
nowadays I don't think it works in many browsers… (very old Firefox, and 
maybe IE: no Chrome, no Safari, no Edge, no recent Firefox)

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


WindowBuilder for GWT

2017-01-08 Thread Thomas Broyer
It's simple: you can't. GWT Designer is unmaintained and hasn't had a release 
for recent versions of Eclipse.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


GWT 2.8 with Java 7

2017-01-06 Thread Thomas Broyer
Those are warnings, and should not break the build (unless maybe you use 
-strict).

Ideally the GWT compiler should be run with java 8, but you can compile (JavaC) 
your classes with java 7 and deploy gwt-servlet to a 1.7 JVM.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Requestfactory: How to use Object?

2017-01-06 Thread Thomas Broyer


On Friday, January 6, 2017 at 1:11:35 PM UTC+1, Ignacio Baca Moreno-Torres 
wrote:
>
> Hehe this is not a bad thing! Just means that now exists simpler 
> solutions. I personally think that RF keeps track of object (the entity id) 
> which add really a lot of complexity, at this point I think that the lib 
> should include some kind of storage with remote synchronization because if 
> not, the complexity just makes thing difficult with the "only" benefit of 
> reducing transfer size.
>

FWIW, that was the original design, in the first milestones of GWT 2.1. It 
was overhauled in the RC (too complex I believe, particularly when 
requesting partial objects, meaning that your "local cache" could have some 
properties that are out-of-date, breaking the "diff" requests).
 

> I also don't like the obscure encoding,
>

Much less obscure than RPC ;-)
And "documented" by 
AutoBeans: 
https://github.com/gwtproject/gwt/tree/2.8.0/user/src/com/google/web/bindery/requestfactory/shared/messages
They allow entities to be referenced multiple times without duplication, 
including reference cycles.

not easy to debug, not compatible with changes in the model (sometimes). 
> IMO RF was promising, but it's complexity do not justify its benefits.
>

I tend to agree. The main reason RF hasn't have more bugs fixed is that 
it's awfully complex (particularly on the server side) and hard to debug. I 
had floated the idea for years now to simplify things by generating code 
and relying less on reflection, but I'm not sure it'd be "compatible" with 
the ServiceLayer machinery.
 

> But the best thing to do is always an small project, and test each 
> strategy, RF, RPC and Rest+Jackson, Rest+JsInterop. The last one has de 
> benefit nowadays than is done almost everything in the browser natively 
> without different code for different browsers.
>

Most importantly, Web APIs put the complexity out of the code and into the 
protocol/API-design (to make it RESTful): they're super-easy to code on the 
both server (using Spring Web, JAX-RS, Restlet or RESTX) and client side 
(using JsInterop; which even allows your to share your objects –or 
interfaces– with the server)
If you're not too concerned with RESTful-ness and are happy with an 
RPC-style API, then JSON-RPC is quite easy to implement (and while RF can 
do JSON-RPC, it's not worth the complexity IMO)
And who knows, maybe one day we'll finally have grpc-web ;-)

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Where do I find old distributions?

2017-01-03 Thread Thomas Broyer


On Tuesday, January 3, 2017 at 10:41:35 AM UTC+1, Rémon Sinnema wrote:
>
> The website  still points to 
> googlecode.com, but that is no longer available. For instance, 
> http://google-web-toolkit.googlecode.com/files/gwt-linux-1.7.1.tar.bz2 gives 
> a 404.
>

There's an open pull request that updates those links: 
https://github.com/gwtproject/gwt-site/pull/205
(but honestly, such ancient versions are likely to produce JS that breaks 
in modern browsers) 

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Custom Bean validation

2017-01-03 Thread Thomas Broyer


On Tuesday, January 3, 2017 at 10:37:50 AM UTC+1, 129pierre wrote:
>
> Hi,
>
> I am looking at validation in 
> http://www.gwtproject.org/doc/latest/DevGuideValidation.html but I didnot 
> see anything for custom validation.
>

Because there's nothing specific to GWT about it.
 

> Let's  say my Person class has 2 fields :
> private Date birthDate;
> private Date graduationDate;
>
> How to add a validation inforcing that graduationDate is after birthDate ?
>

You'd write (or use) a constraint that you'd apply to the class so it can 
access both fields.

But beware, Bean Validation support is deprecated!
http://www.gwtproject.org/release-notes.html#Release_Notes_2_8_0_RC1

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT 2.8.0 released

2017-01-01 Thread Thomas Broyer
GWT 2.8 dropped support for Java 6. You can probably use tools to "backport" 
the JAR to be Java 6-compatible.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Compiler requests

2016-12-30 Thread Thomas Broyer
On mobile so can't develop as much as I'd want.

1. Have a look at how JUnitShell synthesizes the .JUnit modules.
2. gwt.xml files are on the way out, once GWT will have adopted J2CL. This will 
take time though. The reasons for those files are source/super-source/public 
paths and deferred binding.
3. You should be able to configure the ResourceOracle for that ; have a look at 
how the CodeServer handles its -src arguments

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Requestfactory: How to use Object?

2016-12-26 Thread Thomas Broyer
+1 Do not start learning/using RequestFactory (or even GWT RPC I'd say). Learn 
JsInterop and use json-based http APIs.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


GWT Elemental - byte stream from microphone

2016-12-26 Thread Thomas Broyer
Elemental 1 hasn't been updated for a while. Elemental 2 hasn't been released 
yet but will have those APIs. In the mean time, you can write the JsInterop 
glue code yourself.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


GWT and async requests (startAsync)

2016-12-23 Thread Thomas Broyer
GWT RPC has been thought of as blocking on the server side. Making it async 
would require changes to the RemoteServiceServlet: most likely the method would 
be async just like on the client side with the implementation calling the 
callbacks onSuccess or onFailure.

Your best bet here would be to write a RemoteServiceAsyncServlet by copying 
from RemoteServiceServlet, hoping for all underlying APIs to be public.
Either that or move off of RPC for that call (future proof)

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT and Bazel

2016-12-18 Thread Thomas Broyer


On Saturday, December 17, 2016 at 9:56:16 PM UTC+1, Konstantin Solomatov 
wrote:
>
>
>> It has dev mode, but it works only with the source folders from the 
>>> module where you declare gwt_application. Are there any ways to workaround 
>>> this implementation.
>>>
>>
>> From the documentation there's a java_roots attribute to gwt_application 
>> (but generally with Bazel you'd put everything into a single source root, 
>> contrary to many other build tools like Maven or Gradle)
>>
> I've seen it. But it seems to be a little bit of a hack.
>

It is.
 

> I wonder, how do you do this in google, i.e. with google's native tools? I 
> bet, it's very hard to put everything into one source root, especially in 
> large projects.
>

This is basically what packages are for. In jetpad, you've "duplicated" 
your (Maven) module structure into your package hierarchy, so you can 
easily flatten everything into a single source root and keep the exact same 
module separation, where one package == one module.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: IDEs, Dagger2 and annotationProcessorPaths

2016-12-17 Thread Thomas Broyer
Nothing to do with Dagger proper, it's a Maven and IDE integration issue. 
annotationProcessorPaths of maven-compiler-plugin is quite new (and with issues 
on its own) and it's not really surprising that IDEs haven't caught up yet.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT and Bazel

2016-12-16 Thread Thomas Broyer


On Thursday, December 15, 2016 at 9:36:22 PM UTC+1, Konstantin Solomatov 
wrote:
>
> Does anybody use rules for bazel from here: 
> https://github.com/bazelbuild/rules_gwt? It seems that these rules are 
> quite immature. Does anybody try to use it? Are there any alternatives to 
> this?
>

At least Erik Kuefler (the author) uses them with his team at Xperiel.
 

> It has dev mode, but it works only with the source folders from the module 
> where you declare gwt_application. Are there any ways to workaround this 
> implementation.
>

>From the documentation there's a java_roots attribute to gwt_application 
(but generally with Bazel you'd put everything into a single source root, 
contrary to many other build tools like Maven or Gradle)

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: IDEs, Dagger2 and annotationProcessorPaths

2016-12-15 Thread Thomas Broyer
This is a Dagger question and Dagger support is done on StackOverflow. But no I 
don't think you can use the incremental compiler (people have similar issues 
with Android/Gradle builds with the new incremental Jack toolchain)

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: CustomButton implementation leads to incorrect handling of PushButton by screen readers

2016-12-13 Thread Thomas Broyer
Thank you for the patch but could you follow the submission guidelines at 
http://www.gwtproject.org/makinggwtbetter.html ?

Also, you're changing the behavior for *all but* ToggleButton, while the 
conservative approach would be to change it only for PushButton.
BTW, you may want to consider filing an issue and reference it in a comment in 
the code.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Windows 10 compatibility

2016-12-13 Thread Thomas Broyer

On Tuesday, December 13, 2016 at 1:29:53 PM UTC+1, Kirill Prazdnikov wrote:
>
> Are there any plans to remove legacy dev-mode ?


No precise plan yet, but it *will* happen.
We've started making changes to the Java Runtime Emulation that are not 
compatible with devmode (namely an optimization for 
java.util.Objects#equals when both arguments are strings).

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Windows 10 compatibility

2016-12-13 Thread Thomas Broyer


On Tuesday, December 13, 2016 at 11:24:27 AM UTC+1, Mounika Avala wrote:
>
> Hello,
>
> Here I am writing this email to you to know the information about this 
> application Google Web Toolkit Developer Plugin for IE 1.0.7263.0.we  would 
> like to know whether is application is supported on windows 10   operating 
> system or not.
>

I *think* it'll work, but dev mode is deprecated; you should use so-called 
"super dev mode", which doesn't require any browser plugin (compiles Java 
to JS on-the-fly, run the JS, debug the JS with the help of sourcemaps)
Actually, super dev mode has been the default mode for 2 years now 
(starting with GWT 2.7), so the legacy dev mode will only be used if you 
explicitly ask for it (or use an oldish version of GWT).

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: CustomButton implementation leads to incorrect handling of PushButton by screen readers

2016-12-13 Thread Thomas Broyer


On Tuesday, December 13, 2016 at 8:14:50 AM UTC+1, Julio Feferman wrote:
>
> I am instrumenting an application for best possible support for assistive 
> technologies (ATs) such as screen readers, using GWT's ARIA implementation. 
> I see that the CustomButton widget setEnabled() method sets the 
> aria-pressed attribute on the button element if it is enabled. This is fine 
> for a ToggleButton but wouldn't it be incorrect for a PushButton? When the 
> aria-pressed attribute is present, screen readers interpret the widget as a 
> toggle button. In the case of a push button, however, this attribute should 
> not be present, in order to allow the AT to click the widget via keyboard 
> commands, instead of toggling it. 
>

>From the code, it looks like it sets the aria-pressed state to either true 
or false depending on the current pressed state when enabled, and un-sets 
the state when disabled.
The thing is, a PushButton is CustomButton, which actually is a kind of 
"toggle button". The ToggleButton makes it easier to work with by adding 
style names corresponding to the "faces", providing constructors to easily 
create such "faces", and having a boolean value corresponding to the 
"pressed" state. And the PushButton is actually one such button that is 
only "pressed" while the mouse button or keyboard key is depressed.
This seems to be in line with the WAI ARIA spec: 
https://www.w3.org/TR/wai-aria/states_and_properties#aria-pressed, with the 
exception that most people don't see a PushButton as such a "special kind 
of toggle button"; so I'd agree with you that aria-pressed shouldn't be 
used for a PushButton (leaky abstraction).

Actually, I strongly believe CustomButton and derivatives are a legacy that 
should be avoided. They're from a time where you couldn't easily style 
, or  to create toggle buttons; this is no 
longer the case.
Don't use a PushButton, use a Button instead. And I'd even say don't use a 
ToggleButton, use a Checkbox (or RadioButton) with proper styling, and 
possibly add ARIA attributes to make it "appear" like a toggle button to 
ATs too.

Even though I believe those widgets should be deprecated, feel free to 
propose a patch, I'll (help) review it. I'm not sure we could come up with 
a viable patch though: CustomButton is "too abstract", and yet we don't 
want to move the ARIA handling to subclasses as that would remove it from 
existing custom widgets people could have written based on CustomButton. 
Maybe add a boolean (add constructor overloads) telling the CustomButton 
whether it's a toggle button or a command button? (that seems slightly 
wrong though, as that'd mean the onClick/onClickStart/onClickCancel could 
probably use that information too instead of relying on subclasses to 
change the button's behavior).
No, really, the long-term solution is to deprecate at least PushButton and 
move on to Button.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: About running tests in a project built via tbroyer's maven multi-module archetype

2016-12-03 Thread Thomas Broyer


On Friday, December 2, 2016 at 8:06:23 PM UTC+1, vitrums wrote:
>
> Is it safe to leave it like this?
>

Absolutely.

And actually, there's no bug in gwt:test. gwt:test (actually, GWTTestCases, 
whether run through gwt:test or surefire:test or whatever) simply expects 
the sources to be on the classpath.
What you faced was just a limitation of Maven's linear lifecycle when 
combined with reactor builds: because source:jar-no-fork in shared-lib was 
bound to the package phase, and you didn't run it (you only run the 
lifecycle up to the test phase, in each module) the source-jar wasn't 
available (and neither was the jar BTW). When Maven needs to resolve a 
dependency from the reactor build and no artifact has been attached to the 
project, it simply defaults to using target/classes (it actually depends on 
the packaging), so you never got your sources when running tests. By 
attaching the source:jar-no-fork to the process-classes phase, when the 
test phase is run, the source-jar is attached to the project so it can be 
resolved.
My take on this is that you shouldn't ever run any lifecycle phase prior to 
package (at least in a reactor build), and this is why I attached the 
source:jar-no-fork to the package phase in the gwt-maven-archetypes. 
Failing to run at least up to the package phase means that your artifacts 
aren't fully built and attached, and Maven uses heuristics to replace them, 
and it can fail you and cause all sorts of issues (generally breaking your 
build, but it could also cause false-positives).

All this discussion makes me want to write (yet another) blog post on why 
Maven is broken by design, and how to avoid failing into its traps 
(basically: use "mvn verify" instead of "mvn install" as that's what you 
want 99% of the time, never run anything prior to the package phase in a 
reactor build, and use -DskipTests or -Dmaven.test.skip if you want to skip 
tests, or -Dtest= to filter tests to run)

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: About running tests in a project built via tbroyer's maven multi-module archetype

2016-12-02 Thread Thomas Broyer
You might have just uncovered a bug in gwt:test. I think a workaround would be 
to move the maven-source-plugin to the process-classes phase.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: About running tests in a project built via tbroyer's maven multi-module archetype

2016-12-02 Thread Thomas Broyer


On Friday, December 2, 2016 at 5:48:36 PM UTC+1, vitrums wrote:
>
> Even though I can read .pom configuration files, I'm not strong in 
> configuring them myself, when it comes to multi-module project. Especially 
> when it comes to packaging servlets as *jar*.
>

Well, servlets are nothing more than Java classes extending from a specific 
abstract class. What makes it a servlet is how it's used at runtime (when 
used in a WAR to be deployed to a servlet container, then there needs to be 
a servlet mapping, defined either using a @WebServlet annotation or some 
XML in either a WEB-INF/web.xml file in the WAR, or a 
META-INF/web-fragment.xml in a JAR sitting in the WEB-INF/lib of the WAR.
 

> So I introduced the new module *sandbox-server-lib*. But which files 
> should it consume from *sandbox**-server*? E.g. if I move only 
> *com.mycompany.GreetingServiceImpl.java* under *sandbox-server-lib* I 
> won't have servlet mappings, necessary for jetty to operate during tests in 
> *sandbox-client* (should I duplicate some files and have them in both 
> modules)?
>

There's no "servlet mappings […] for jetty to operate during tests"; the 
servlet mapping for GWTTestCase tests is defined by a  element in 
a gwt.xml file.
In other words, when everything is in a single project (like the one 
generated by webAppCreator, or the wizard in Eclipse, or the archetype from 
the org.codehaus.mojo:gwt-maven-plugin), the 
src/main/webapp/WEB-INF/web.xml is completely ignored during tests.
 

> If I move */src/main/webapp,* then I'm not even sure what will be left 
> for  *sandbox-server* to package as *war* and how to deploy it in 
> container. And which dependencies, plugins and configurations would 
> *sandbox-server-lib's* pom require (and what left from *sandbox-server* after 
> all these operations)?
>

Try with "nothing" :-)
Well, in the server-lib you'll need a dependency on javax.servlet to be 
able to compile your servlet, and in server (the WAR) you'll add a 
dependency on server-lib. No plugin should be needed. 
 

> I know I'm terribly lost :)
>

Yes, you look like you're lost :-)
I'm afraid you can't develop in any given technology without learning the 
"basics" (between quotes, because it can mean a lot of things; learning 
curves are steep these days, and tending to become each year steeper than 
the preceding) : what is the classpath, a classloader, a JAR, a WAR, how to 
build a (simple) JAR (using the command-line, or some build tool), how to 
build a (simple) WAR. GWT adds a lot of things to those "basics", 
particularly when your build tool is as opinionated (and broken-by-design) 
as Maven.

I'm a bottom-up learner, first learning how things work (from 
documentation, not experimentation) before doing something with them, 
rather than a top-down learner, first doing things (possibly copy/pasting 
snippets here and there "until it works") then trying to understand how and 
why it all worked. That makes me a terrible teacher for top-down learners, 
who are better served with heavy full-stack frameworks and full scaffolding 
(ultimately leading to a huge amount of third-party code to do a simple 
hello world, if you ask me). Please note that I'm not judging "top-down 
learners", everybody is different and learns differently; I'm only 
acknowledging I'm generally unable to help them. I'm not sure what kind of 
learner you are, just letting you know that if you're a top-down one, then 
I'm probably not the right "teacher", and my gwt-maven-archetypes haven't 
been tailored for you (I *am* expecting average knowledge of Maven *and*
 GWT).

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: About running tests in a project built via tbroyer's maven multi-module archetype

2016-12-02 Thread Thomas Broyer


On Friday, December 2, 2016 at 5:53:46 AM UTC+1, vitrums wrote:
>
> It's also not clear for me why greetingService test classes must've been 
> completely excluded from the *modular-webapp* archetype.
>

Because, actually, using  in GWTTestCases is not seen as a good 
practice (anymore). GWTTestCases should be unit tests, running in a 
GWT/browser environment, not integration tests. For that, the preferred way 
is to use end-to-end tests.
 

> Archetypes in general serve to unify the maximum of core best practices 
> relevant to some particular project structure (tests including), don't they?
>

Archetypes are meant as scaffolding tools to cut boilerplate down. Putting 
"too much" things into an archetype means that you have to delete/refactor 
many things before actually being able to use the generated project.
The gwt-maven-archetypes could include some tests, but the code is so light 
that it'd be far-fetched and not realistic.

In your specific case, if you want to replicate the test using 
GreetingService; you'd have to create a new standard JAR module with your 
server code. The WAR module would depend on it (to include into the 
WAR/webapp); and the client (gwt-app) module could depend on it with 
test.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT [Error] Rebind result 'com.viktor.MyClassJSO' cannot be a JSO

2016-12-02 Thread Thomas Broyer


On Friday, December 2, 2016 at 8:24:01 AM UTC+1, Viktor Krejčíř wrote:
>
> Hi all,
>
> after upgrading from GWT 2.6. to 2.8 stable version, I've started getting 
> this error during compilation.
>
> The MyClassJSO is just plain JSO class (extends JavaScriptObject), so I 
> really don't know where the problem is.
>
>
> *Does anyone know what does this error exactly mean?*
>

"Rebind result" means something returned from a call to GWT.create(…). This 
can be the result of a  rule in your gwt.xml, what a 
generator returns (invoked because of a  rule in your 
gwt.xml), or simply the class passed to the GWT.create(…) it no 
 or  rule matched.
 

> I've managed to change logging level to more verbose one, but no further 
> info appears.
>

You should at least find the place of the GWT.create() call leading to this 
error, and depending on the log level the replace-with or generate-with 
rule in use (if any).
Note that the GWT.create(…) call can itself be in some code created by a 
generator (such as Google GIN, or UiBinder).

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Can't build maven sample GWT app, generated by webAppCreator

2016-11-16 Thread Thomas Broyer


On Wednesday, November 16, 2016 at 4:10:04 PM UTC+1, vitrums wrote:
>
> [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ WebApp ---
> [INFO] Changes detected - recompiling the module!
> [INFO] Compiling 5 source files to 
> C:\temp\mvnSampleGwtApp\WebApp\target\WebApp-1.0-SNAPSHOT\WEB-INF\classes
> [WARNING] error reading 
> C:\Users\vitru\.m2\repository\ant\ant\1.6.5\ant-1.6.5.jar; invalid LOC 
> header (bad signature)
> [WARNING] error reading 
> C:\Users\vitru\.m2\repository\com\ibm\icu\icu4j\50.1.1\icu4j-50.1.1.jar; 
> invalid LOC header (bad signature)
>

Looks like you have corrupted JARs. Try re-downloading them (delete them 
and re-run Maven) 

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Internet Explorer Google Web Toolkit Plugin Installing but not Working.

2016-11-15 Thread Thomas Broyer


On Tuesday, November 15, 2016 at 12:55:01 AM UTC+1, Slava Pankov wrote:
>
> Dev mode works just fine with GWT 2.8 in old Firefox 24 esr and IE11. 
>

Thanks for the confirmation.
Just after I sent my mail, I new I was probably wrong: devmode doesn't use 
the Java Runtime Emulation (JRE) library, and JsInterop is currently only 
used in the JRE.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Internet Explorer Google Web Toolkit Plugin Installing but not Working.

2016-11-14 Thread Thomas Broyer


On Monday, November 14, 2016 at 12:12:01 PM UTC+1, Kirill Prazdnikov wrote:
>
> Why not to approve the dev-mode-delete.patch ?
>

You're right, maybe now is the time. I think we'll discuss this at the next 
Steering Committee meeting; in the meantime, feedback is welcome (e.g. if 
DevMode already is broken)

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Problems with ClickEvents when using CellTree within DataGrid.

2016-11-14 Thread Thomas Broyer


On Monday, November 14, 2016 at 10:51:35 AM UTC+1, magnus@raybased.com 
wrote:
>
> I have some problems when using a CellTree within a DataGrid.
> Everything works except when clicking on the tree, nothing happens.
> I would expect the tree to expand/retract.
> Does anyone know of a solution ?
>
[…] 

> private void buildCell(Node rowValue, String cellStyles, 
> TableRowBuilder row) {
> NodesTree hw = new NodesTree(rowValue);
> TableCellBuilder td = row.startTD().colSpan(5);
> td.className(cellStyles);
> DivBuilder div = td.startDiv();
> String t = hw.getWidget().getElement().getInnerHTML();
>

First, widgets' event wiring is done in such a way that they need to be 
"attached" for the events to actually be listened to; 
see 
https://github.com/gwtproject/old_google_code_wiki/blob/master/DomEventsAndMemoryLeaks.wiki.md
 
for an oldish explanation.
Second, even if that wasn't the case, you couldn't expect event handlers to 
be preserved when "serializing" the widget's element to HTML and then 
re-parse it (moreover, you're taking the innerHTML of the element here, 
which excludes the element itself, therefore would have excluded all event 
handlers set on the element, *if* serialization would have preserved them, 
which is not the case)

So, sorry, but that's not going to work.
It might be possible hacking around: generate placeholder elements in 
buildCell and schedule a task that will "attach" the CellTree to the 
placeholder element; each time the cell is re-rendered.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Internet Explorer Google Web Toolkit Plugin Installing but not Working.

2016-11-14 Thread Thomas Broyer

On Sunday, November 13, 2016 at 9:57:44 PM UTC+1, Kirill Prazdnikov wrote:
>
> I`m not sure, but I saw people were saying that they will deprecate all of 
> dev mode code finally, one day... 
>

Yes.
Google have already deleted it in their internal codebase and have been 
pushing for removing it from GWT proper ever since the release of GWT 2.7.
It's also highly likely that it won't even work anymore due to changes in 
the Java Runtime Emulation, which has started using JsInterop.
So yes, definitely, it's more deprecated than ever (read: no effort has 
been put to make sure it still even works), and is likely to be deleted 
altogether in the future (and maybe we should have done it in 2.8…)

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: JsonpRequestBuilder - Timeout while calling

2016-11-08 Thread Thomas Broyer
A status code of 0 is generally indicative of a cross origin request without 
CORS (or an aborted request or network error)

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT 2.8.0 released

2016-11-08 Thread Thomas Broyer
Basically, either you use "managed dependencies" (Maven, Gradle, Ivy, etc.) 
and it should resolve all dependencies for you; or you use the GWT SDK that 
you can download from the project website which bundles (almost) everything 
into 2 JARs.
If you download from a Maven repo, then you'll need 
jsinterop-annotations-1.0.1-sources.jar (have a look at the POMs for the 
complete list of dependencies).

On Tuesday, November 8, 2016 at 1:09:06 PM UTC+1, Rasmus Olesen wrote:
>
> Hi 
>
> There might be an issue with the gwt-user-2.8.0.jar or 
> jsinterop-annotations-1.0.x.jar(s) uploaded to the maven repository.
>
> We are getting the following error:
>
>
> *   Loading inherited module 'com.google.gwt.core.Core'  Loading 
> inherited module 'jsinterop.annotations.Annotations' [ERROR] Unable 
> to find 'jsinterop/annotations/Annotations.gwt.xml' on your classpath; 
> could be a typo, or maybe you forgot to include a classpath entry for 
> source?*
>
> The jsinterop-annotations sources are found in the gwt-user.jar which can 
> be downloaded from http://www.gwtproject.org/versions.html
> But they are not found in the gwt-user-2.8.0.jar which can be downloaded 
> from https://mvnrepository.com/artifact/com.google.gwt/gwt-user/2.8.0
> And the jsinterop-annotations-1.0.0.jar and 
> jsinterop-annotations-1.0.1.jar jars, which can be found at 
> https://mvnrepository.com/artifact/com.google.jsinterop/jsinterop-annotations,
>  
> only contain the binaries.
>
> Please let me know if this is not the correct "forum" for this question.
>
> Best regards
> Rasmus
>
>
> Den fredag den 21. oktober 2016 kl. 21.21.41 UTC+2 skrev Daniel Kurka:
>>
>> Hi all,
>>
>> I am very happy to announce GWT 2.8.0 on behalf of the GWT steering 
>> committee and the GWT team at Google.
>>
>> You can download the release from http://www.gwtproject.org/download.html 
>> or from maven central.
>>
>> The release notes can be found at 
>> http://www.gwtproject.org/release-notes.html#Release_Notes_2_8_0
>>
>> Daniel,
>> on behalf of the GWT team
>>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: JsonpRequestBuilder - Timeout while calling

2016-11-08 Thread Thomas Broyer
JsonpRequestBuilder has a default timeout of 10 seconds, whereas 
RequestBuilder doesn't have a timeout by default.
http://www.gwtproject.org/javadoc/latest/com/google/gwt/jsonp/client/JsonpRequestBuilder.html#setTimeout(int)
Anyway, if you can setup CORS on your server (Access-Control-Allow-Origin 
response header whitelisting your client, or simply "*"), better use that 
and RequestBuilder than JSONP (better error handling, much better security, 
etc.): http://caniuse.com/cors

(talking about security: use com.google.gwt.core.client.JsonUtils to parse 
JSON, *not* eval() !)

On Monday, November 7, 2016 at 11:53:33 PM UTC+1, Velusamy Velu wrote:
>
> Trying to retrieve an object in my GWT client using JsonpRequestBuilder 
> from a cross domain server.  The call goes to server and server does 
> respond with the correct value but the client keeps throwing "Timeout 
> while calling http://localhost:8080/layouts/AVhARgXQW9-o1U_GgvJa"; 
> message. Here are the code snippets.
>
> The call is made from this class -
> public class EntityFisher {
> public String fish(String id) {
> JsonpRequestBuilder builder = new JsonpRequestBuilder();
> String url = "http://localhost:8080/layouts/"; + id;
> AsyncCallback callback = new LayoutFisherCallback();
> JsonpRequest layoutJson = builder.requestObject(url, 
> callback);
>   ...
> return t;
> }
> }
>
> LayoutJson.java
> public class LayoutJson extends JavaScriptObject {
> protected LayoutJson() {}
> public static final native LayoutJson build(String json) /*-{
> return eval('(' + json + ')');
> }-*/;
>
> public final native JsonArray getCoordinates() /*-{
> return this.coordinates;
> }-*/;
> }
>
> LayoutFisherCallback.java
> public class LayoutFisherCallback implements AsyncCallback {
> @Override
> public void onFailure(Throwable caught) {UiFlag.flag(caught);}
>
> @Override
> public void onSuccess(LayoutJson layoutJson) {
> JsonArray pointsJson = layoutJson.getCoordinates(); // 
> code never reaches this point
> UiFlag.flagNull("pointsJson", pointsJson);
> ArrayList coordinates = new ArrayList<>();
> UiFlag.flag(coordinates.toString());
> }
> }
>
> the call is kicked off like this
>EntityFisher fisher = new EntityFisher();
>fisher.fish(id);
>
> I see everything done correctly on the server side and the JSON
> {"coordinates":[{"x":100,"y":90,"z":0,"index":0,"time":1478546404606},{"x"
> :118,"y":121,"z":0,"index":1,"time":1478547002023},{"x":154,"y":121,"z":0,
> "index":2,"time":1478547079871}]}
> is sent back as expected but I keep getting the "Timeout while calling 
> http://localhost:8080/layouts/AVhARgXQW9-o1U_GgvJa"; on the client side. 
> When I make the request through GWT RequestBuilder (as a same origin 
> request) everything works good.
>
> Any idea what's wrong in the above code?
>
> I would appreciate any help.
> Thanks
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT Logger: your best practices, tips and reasonings.

2016-11-08 Thread Thomas Broyer


On Tuesday, November 8, 2016 at 4:36:20 AM UTC+1, vitrums wrote:
>
> Recently I found, that some log4j-like functionality in my client's code 
> could be handy. So with the GWT logging module I can pretty much have a 
> shared logging code, which is very convenient to use on both sides. The 
> tutorial is here http://www.gwtproject.org/doc/latest/DevGuideLogging.html 
> . However, I instantly ran into multiple questions:
>
> 1) How many loggers *(Logger.getLogger("logger-name")) *should I 
> typically get away with in an average size project? What will their 
> hierarcy and naming convention *("" -> "Parent-name" -> 
> "Parent-name.Child-name") *be? And therefore which one should be the most 
> common across the code for debugging and user's feedback during 
> troubleshooting *(is it some "parent.child.grandson...Adam"?)* // *see 2)*
>

The common practice (with almost any Java logging framework) is to have 
your loggers as static final fields and using the class name as the logger 
name (some logging frameworks even have static factory methods taking a 
java.lang.Class as "name").
 

> 2) I'm developing my projects with GIN, and since a call like 
> *Logger.getLogger("logger-name")* has a string constant *"logger-name"*, 
> then any logger should definitely become a subject of injection (in my 
> opinion). Hence, I created providers - one per *"logger-name"* - and 
> bound *Logger.class* to them with an annotation, just like this:
> bind(Logger.class).annotatedWith(DefaultLogger.class).toProvider(
> DefaultLoggerProvider.class).in(Singleton.class);
> Clients of this logger are all sorts of views, presenters and UI 
> components. They usually obtain an instance by field or constructor 
> injection:
> @Inject @DefaultLogger private java.util.logging.Logger logger;
> I would like to know the *pros and cons* of this solution from your point 
> of view. Again, any best practices are very much welcome.
>

Re. the common practice above, you won't generally inject loggers.
Guice (but not GIN AFAIK) has custom support for java.util.logging.Logger 
and will inject them without the need for any 
configuration: https://github.com/google/guice/wiki/BuiltInBindings#loggers 
Note that this is only to remove some boilerplate, and Guice would inject a 
logger whose name is the name of the class it's injected in (see 1 above 
re. the common practice for naming loggers)

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT 2.7.0 Compile Errors

2016-11-08 Thread Thomas Broyer


On Tuesday, November 8, 2016 at 8:20:58 AM UTC+1, Majdi ABDELMOULA wrote:
>
> Thank you for your reponse. 
>
>> the problem GXT is not free now. I will lost two old projects (projects 
>> since 6 years). I will use smart GWT for a new project, so i must start 
>> from zero, but i worry that Smart GWT will be not free in the future too. 
>>
> The only solution for resolving these errors , is to Buy GXT plugin from 
> the sencha website ??  
>

gxt 2.3.1a-gwt22 
(https://search.maven.org/#artifactdetails%7Ccom.extjs%7Cgxt%7C2.3.1a-gwt22%7Cjar)
 
might work with 2.7: 
https://plus.google.com/106079938918640446800/posts/iAL9m39jFxt 

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT 2.8.0 released

2016-11-08 Thread Thomas Broyer


On Monday, November 7, 2016 at 11:17:10 PM UTC+1, Zeeshan Chughtai wrote:
>
> Hi,
>
> Thanks for this, really happy to have it around. 
>
> We were using 2.8.0-beta1 version for a while without any major fuss. 
>
> While upgrading to 2.8.0 released version, we get stuck with codeserver 
> refused to start because of class loading issues. 
>
> Here are the changes which we had to made.
>
> 
> xml-apis
> xml-apis
> 1.4.01
> 
>
>
>  [INFO] BUILD FAILURE
> [INFO] 
> 
>
>
> I've attached my WEB-IN/lib directory structure with beta version build and 
> released version of 2.8.0 build.
>
>
If this is your WEB-INF/lib, then you have a problem: why does it contain 
gwt-dev and all those Jetty JARs? Those aren't supposed to be inside the 
webapp, they are dev-time dependencies, not runtime ones.
(hint: gwt-dev should have scope provided, not compile)
 

> The jetty version with 2.8.0 release is jetty-util-9.2.14.v20151106.jar which 
>
> doesn't have AggregateLifeCycle class. 
>
>
I'd bet this is due to the jetty-deploy-8.1.10.v20130312.jar. Run "mvn 
dependency:tree" to find out where it comes from.
I also see guava 17 and guava-gwt 20; so overall you need a better 
"dependency hygiene".
And if you somehow have conflicts between the dependencies brought by GWT 
(Jetty et al.) and the ones needed by other, non-GWT dependencies; I highly 
suggest splitting your project into (at least) 2 modules: one for the 
client-side code and one for the server-side code, so that each can have 
its own set of dependencies that won't conflict.


-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT 2.7.0 Compile Errors

2016-11-07 Thread Thomas Broyer


On Monday, November 7, 2016 at 3:53:01 PM UTC+1, Majdi ABDELMOULA wrote:
>
> I have Compile an old GWT project under the plugin GWT 2.7.0 , but i have 
> some errors because the incompatibility between the old version and the new 
> version of the GWT.
> What is the solution for this error ???
>
>
> 
>
[…] 

> Caused by: java.lang.IncompatibleClassChangeError: Found interface 
> com.google.gwt.core.ext.typeinfo.JClassType, but class was expected
>

In GWT 2.2, JClassType (everything in com.google.gwt.core.ext.typeinfo 
actually) was changed from an interface to an abstract class (that was 
almost 6 years ago already, and I can't find where it was announced; and 
release notes for such ancient versions have been lost)

at 
> com.extjs.gxt.ui.rebind.core.TemplatesGenerator$SourceGenerator.validateType(TemplatesGenerator.java:142)
>

You need to update GXT (and all your other dependencies) to a version 
that's compatible with GWT 2.7. 

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


How to store configuration outside the database?

2016-11-06 Thread Thomas Broyer
Externalize into a JNDI Resource? 
https://tomcat.apache.org/tomcat-8.0-doc/jndi-resources-howto.html#JDBC_Data_Sources

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Can a GWT Dev Mode plugin be rewritten for Chrome using NACL?

2016-11-06 Thread Thomas Broyer


On Sunday, November 6, 2016 at 10:55:56 AM UTC+1, Max Fromberger wrote:
>
> From my point of view the only future proof (because never to be 
> deprecated) way of debugging is debugging in JS, i.e. super dev mode. This 
> is going to work until the end of browsers.
>

I still believe one could implement a DevMode using browsers' remote 
debugging protocols (calling into the plugin would be replaced with hitting 
a breakpoint at a specific location, and values would be passed by reading 
and setting variables), and that would be as future-proof as "debugging 
right in JS".
But I'm not the one who'll invest in this thing; source maps are the way to 
go, and in the worst case use -style PRETTY.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Bug in Audio addEndedHandler

2016-11-06 Thread Thomas Broyer


On Sunday, November 6, 2016 at 6:10:08 AM UTC+1, Craig Mitchell wrote:
>
> If you want to listen for the end of an audio track, calling 
> MediaBase.addEndedHandler won't work, as it is using BrowserEvents.ENDED 
> which is set to "ended".
>
> The correct event is actually "onended". Ref:  
> http://www.w3schools.com/tags/av_event_ended.asp
>

Wrong.
The event name is "ended", the "event handler" name is "onended" 
(see https://html.spec.whatwg.org/multipage/webappapis.html#events)
You use the event name with addEventListener, and the event handler name 
for the event handler attribute.

You'll note that even W3Schools talks about the "ended event" too.
 

> So, here is a little JSNI function to do it:
>
> public static native final void listenForEnd(AudioElement aud, Command 
> onComplete) /*-{
>aud.onended = function() {
>   oncomple...@com.google.gwt.user.client.Command::execute(*)();
>};
> }-*/;
>
>
> Hope that helps someone.
>

In which browser is this not working?

Because addEndedHandler works for me in Chrome and Firefox with the 
following code:

Audio audio = Audio.createIfSupported();
audio.setControls(true);
audio.setAutoplay(true);
audio.setSrc("http://www.html5tutorial.info/media/vincent.mp3";);
audio.addEndedHandler(e -> Window.alert("Ended"));
RootPanel.get().add(audio);
 

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Can a GWT Dev Mode plugin be rewritten for Chrome using NACL?

2016-11-05 Thread Thomas Broyer


On Saturday, November 5, 2016 at 11:23:33 AM UTC+1, Ariel Viera wrote:
>
> Is theoretically possible to port GWT Dev Mode plugin for Chrome using 
> PNACL or NACL
>
>
No.

Because communication between JS and NaCl is asynchronous, and DevMode MUST 
be blocking (and reentrant).
(we've already had that conversation many times over the last few years; I 
bet you could find more details in the forum archives)

BTW, I wouldn't bet on NaCl these 
days: https://bugs.chromium.org/p/chromium/issues/detail?id=239656#c160 
(“Pepper and NaCl are destaffed.”)

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT 2.8.0 is not compatible with java6

2016-11-04 Thread Thomas Broyer
With the exception of a few corner-cases, Java 6 source code is also Java 8 
compliant; so the GWT Compiler should be able to process it even though it 
assumes Java 8 source code.

But the question was about JVM requirements: gwt-servlet.jar is compiled as 
Java 7 bytecode in 2.8, so it requires a Java 7 JVM on your server; and 
similarly gwt-dev and gwt-user require a Java 7 JVM on your developers' and 
CI machines (and if you use GIN, because GWT will "internally" compile your 
sources to Java 8 bytecode and GIN will try to actually run that code, 
you'll need a Java 8 JVM)
Retrolambda could possibly solve the issue of gwt-servlet at least, 
possibly also gwt-dev/gwt-user at compile-time.

On Friday, November 4, 2016 at 11:25:46 AM UTC+1, Marko wrote:
>
> How can you use retrolambda for that? Isn't retrolambda transforming the 
> compiled >>bytecode<>source code<< and not 
> bytecode...
>
> Marko
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT 2.8.0 is not compatible with java6

2016-11-02 Thread Thomas Broyer


On Wednesday, November 2, 2016 at 2:38:38 PM UTC+1, Juan Pablo Gardella 
wrote:
>
> Hi all,
>
> At release notes is not mentioned that now it will support only java7.
>

Good catch!
 

> I found tbroyer comment here:
> http://stackoverflow.com/questions/28879590/jdk-and-jre-minimal-versions-required-for-gwt-compiling-and-running
>
> Can be updated the release notes with that?
> http://www.gwtproject.org/release-notes.html#Release_Notes_2_8_0 
>
> Let me know, I can create the pull request.
>

Yes please, go ahead. 

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Strange error with streams

2016-11-01 Thread Thomas Broyer
IIRC, there are gotchas with method references in some cases, and using lambdas 
workarounds the problem. Colin or Andrei would know better as it was them that 
had such issues when implementing… the streams emulation.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Closure compiler and GWT 2.8.0

2016-10-27 Thread Thomas Broyer


On Wednesday, October 26, 2016 at 11:21:02 PM UTC+2, Slava Pankov wrote:
>
> Integrated closure compiler was removed in 2.8.0
> So now I'm trying to use external (post-processing) call to closure 
> compiler.
> SIMPLE mode is working just fine, but gives no improvement over standard 
> GWT compilation at all.
> ADVANCED mode gives improvement (when GWT compiled in PRETTY mode), but 
> produces non-working resulting JS, because it obfuscates $wnd. and __ 
> functions/methods.
> It could be kind of resolved by providing --externs to closure compiler, 
> the problem is it doesn't support regexes, so I have to prepare huge file 
> with exact names to be preserved (and it's semi-manual job, I don't know 
> how to automate it).
>
> 1. So the question is - what is the proper way to get working JS by using 
> external closure compiler?
> 2. There is an option in GWT "-XclosureFormattedOutput", when defined it 
> affects resulting JS produced by GWT, but may be it's obsolete or not 
> supposed to be used at all?
>

I think it's targeted at JsInterop exports so they're goog.export⋅ed thus 
usable by other Closure (JS) code in a "hybrid" Closure JS + GWT app (like 
Google Spreadsheet or Inbox).
 

> 3. I see pom-gwt.xml added to closure compiler repository on github few 
> weeks ago, but cannot figure out what for it supposed to be used? 
> https://github.com/google/closure-compiler/blob/master/pom-gwt.xml
>

This is to compile the Closure Compiler itself to JS through GWT, so it can 
be used in Node without a JVM.

Don't have an answer to your first question though…

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Unchanged transient field received as null on server using RequestFactory - how to force to send?

2016-10-26 Thread Thomas Broyer
Assuming an EntityProxy here, if the field is left unchanged, then it's not 
sent to the server. On the server side, the entity is loaded by the Locator and 
then the diff is applied. So if the Locator gets a null field, it'll be left 
null.
You may have to use a ValueProxy here…

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to bind essential singletons in multi-module GIN app and avoid duplicate binding

2016-10-26 Thread Thomas Broyer
I don't know if it's supported by GIN but Guice has a requireBinding to prevent 
the second case. And if the user of your lib has to use GIN it's not abnormal 
to ask them to bind a few things. You can provide GinModules that bind them if 
you like so they only have to compose them in their Ginjector without the need 
to write the bindings themselves.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT launch client side application

2016-10-24 Thread Thomas Broyer


On Monday, October 24, 2016 at 6:31:19 PM UTC+2, Aaron Paluzzi wrote:
>
> In this case we're trying to launch excel.  Although we might wind up 
> needing to launch any local binary.  Even being able to launch a batch file 
> would be a help.
>
> The reason this is a GWT issue
>

The reason this is *not* a GWT issue is that GWT is a developer 
toolchain to compile Java to JS; but ultimately you're running JS in a web 
browser, and if "JS in a web browser" can't do that, then you won't be able 
to do it, whether you produce the JS through GWT or not.

I'm sorry but there's not solution to your problem (fortunately! for our 
security)

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT 2.8.0 released

2016-10-23 Thread Thomas Broyer


On Saturday, October 22, 2016 at 8:31:43 PM UTC+2, zakaria amine wrote:
>
> Great! Elemental 2 is part of it ?
>

No. Elemental 2 will be released independently (along with its generator I 
believe)

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT cache.html files.

2016-10-21 Thread Thomas Broyer


On Friday, October 21, 2016 at 10:30:23 AM UTC+2, Jarek Suchanek wrote:
>
> Hi Everyone,
>
> I am working on converting old GWT project to the latest version. I have 
> no prior experience with GWT. My old project includes html, js, and xml 
> files. My problem is that when I rebuild that project in IntelliJ with the 
> latest version of GWT all I get is .js files.
> Is that correct?
>

Yes.
The "linker" (which is the last step in the compilation process, and is 
pluggable) was set by default to "std" (also known as IframeLinker) prior 
to GWT 2.7 and it produced *.cache.html files; starting with GWT 2.7, the 
default linker is "xsiframe" (aka CrossSiteIframeLinker) and it produces 
*.cache.js files.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: JS Interop + indexing

2016-10-20 Thread Thomas Broyer

On Thursday, October 20, 2016 at 5:32:11 PM UTC+2, Kirill Prazdnikov wrote:
>
> Hello all, this is an important topic, (despite no one wants to answer 
> for almost 2 month)
>
> Im trying to declare JsArray with interop but there are some issues:
>
> [INFO]Errors in client/jsinterop/core/JsArray.java
> [INFO]   [ERROR] Line 17: JSNI method 'JSObject JsArray.get(int)' is 
> not allowed in a native JsType.
> [INFO]   [ERROR] Line 23: JSNI method 'void JsArray.set(int, 
> JSObject)' is not allowed in a native JsType.
>
> If GWT does not provide us with JsIndexer why then it don't allow JSNI in 
> the native JsTypes ?
>

(Probably) because 'native' already has a defined meaning on native classes.

Pease see the source:
> https://gist.github.com/kirillp/bd35e67910d8216cba139ab9e0af855c
>
>
Can't you delegate to a helper class (with static methods) ?

@JsOverlay public T get(int index) {
  return ArrayHelper.get(this, index);
}

(this looks a lot like java.lang.reflect.Array btw ;-) )

You may also possibly cast your 'this' to an array? (just an untested idea)

@JsOverlay
@SuppressWarnings("unchecked")
public T get(int index) {
  return (T) (((Object[]) ((Object) this))[index]); // or something like 
that, possibly with intermediate local variables if needed (as they'll 
hopefully be optimized out in the compilation)
}

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Cannot Debug GWT with Eclipse

2016-10-20 Thread Thomas Broyer


On Thursday, October 20, 2016 at 10:39:34 AM UTC+2, Vassilis Virvilis wrote:
>
> Hi,
>
> Are we talking about debugging using SDBG plugin, setting breakpoints from 
> the IDE +that kind of thing?
>
> Because if you don't you don't need any reverse proxies for http. I am 
> using it all the time and development machine where the codeserver runs is 
> different from the production server. I am also not using the -launcherDir 
> option.
>

If you use the bookmarklets then yes, that won't be an issue (you may have 
other issues due to limitations of the bookmarklets, but at least not that 
one; that's why bookmarklets aren't recommended since 2.7.0 was released).
What they're talking about here is the interaction of -launcherDir and 
serving it from another machine (pointing -launcherDir to an NFS share or 
similar); see the issue linked to by Brandon.

I'll try to build a "devserver" that would do the reverse-proxying *and* 
some "magic" (paths whitelisting) to serve files directly from the 
codeserver; so you'd launch it like the codeserver with an additional URL 
to reverse-proxy to 
(see https://github.com/gwtproject/gwt/issues/9437#issuecomment-250926589)
But in the mean time, refer to the above discussion.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: gwt test cases failing after migrating to GWT 2.7.0 only when building the project using maven install

2016-10-19 Thread Thomas Broyer
Have you updated gwt-test-utils accordingly? You apparently need 0.51 or 
0.52 for use with GWT 2.7.0.
Also, you may have better guidance in the gwt-test-utils 
forum: https://groups.google.com/forum/#!forum/gwt-test-utils-users

On Wednesday, October 19, 2016 at 10:40:02 AM UTC+2, saritha rapolu wrote:
>
> Hi,
> I migrated the GWT project to *GWT 2.7.0* version. After that, when i 
> build the project using *-Dmaven.test.skip.exec clean install* then build 
> is successful. But when i run *clean install* then GWT test cases are 
> failing with following exception
>
> initializationError(com.example.ui.client.TestElementsActivity) Time 
> elapsed: 0.001 sec <<< ERROR!
> java.lang.IncompatibleClassChangeError: com/google/gwt/dev/javac/
> BytecodeSignatureMaker$CompileDependencyVisitor
>  at com.google.gwt.dev.javac.BytecodeSignatureMaker.
> visitCompileDependenciesInBytecode(BytecodeSignatureMaker.java:227)
>  at com.google.gwt.dev.javac.BytecodeSignatureMaker.
> getCompileDependencySignature(BytecodeSignatureMaker.java:209)
>  at com.google.gwt.dev.javac.CompiledClass.getSignatureHash(CompiledClass.
> java:166)
>  at com.google.gwt.dev.javac.Dependencies$Ref.(Dependencies.java:42)
>  at com.google.gwt.dev.javac.Dependencies$Ref.(Dependencies.java:37)
>  at com.google.gwt.dev.javac.Dependencies.resolve(Dependencies.java:114)
>  at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.
> compile(CompilationStateBuilder.java:366)
>  at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(
> CompilationStateBuilder.java:580)
>  at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(
> CompilationStateBuilder.java:513)
>  at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(
> CompilationStateBuilder.java:499)
>  at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:
> 668)
>  at com.googlecode.gwt.test.internal.GwtFactory.createCompilationState(
> GwtFactory.java:146)
>  at com.googlecode.gwt.test.internal.GwtFactory.(GwtFactory.java:109
> )
>  at com.googlecode.gwt.test.internal.GwtFactory.initializeIfNeeded(
> GwtFactory.java:43)
>  at com.googlecode.gwt.test.internal.junit.AbstractGwtRunner.(
> AbstractGwtRunner.java:27)
>  at com.googlecode.gwt.test.GwtRunner.(GwtRunner.java:18)
>  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>  at sun.reflect.NativeConstructorAccessorImpl.newInstance(
> NativeConstructorAccessorImpl.java:57)
>  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
> DelegatingConstructorAccessorImpl.java:45)
>  at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
>  at org.junit.internal.builders.AnnotatedBuilder.buildRunner(
> AnnotatedBuilder.java:31)
>  at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(
> AnnotatedBuilder.java:24)
>  at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder
> .java:57)
>  at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.
> runnerForClass(AllDefaultPossibilitiesBuilder.java:29)
>  at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder
> .java:57)
>  at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:
> 24)
>  at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider
> .java:262)
>  at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(
> JUnit4Provider.java:153)
>  at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.
> java:124)
>  at org.apache.maven.surefire.booter.ForkedBooter.
> invokeProviderInSameClassLoader(ForkedBooter.java:200)
>  at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(
> ForkedBooter.java:153)
>  at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:
> 103
>
> *Note:*
>
>
>-  *-*When i run the GWT testcase separately then the test case was 
> successful, but when i run build using clean.install then failing. 
>-  GWT testcases are written on com.googlecode.gwt.test.GwtTestWithMockito
>
> Please help me in overcoming this issue.
>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Cannot Debug GWT with Eclipse

2016-10-17 Thread Thomas Broyer
Maybe try out the new GWT Eclipse Plugin, which (AFAICT) bundles everything 
together: 
http://gwt-plugins.github.io/documentation/gwt-eclipse-plugin/debugging/Debugging.html

On Monday, October 17, 2016 at 12:48:38 AM UTC+2, Namline wrote:
>
> Jens,
>
> Actually, I took your advice and managed to set break points in Chrome's 
> Developer tool (in Source tab, under sourcemap folder where the Java 
> classes are) and debug from there (not that anything made sense with all 
> the generated JavaScripts).
>
> I also tried SDBG which more or less does the same thing but in the 
> Eclipse as a plugin. I just followed the video on SDBG site 
> and got it to work. What was confusing about it 
> was to run debugging in SuperDevMode first, then rerun the Eclipse Debug 
> As, but this time Launch Chrome from Debug Configuration. It actually 
> spawns two (2) debugging sessions from the looks of it: one for Web 
> Application (code server) and the other for Launch Chrome. Thanks for the 
> recommendation.
>
>
> On Sunday, October 16, 2016 at 3:46:59 PM UTC-4, Jens wrote:
>>
>> SuperDevMode compiles your Java source transparently to JavaScript, it 
>> never executes your Java source code directly in a JVM. So Java break 
>> points in your GWT app will never work.
>>
>> That means with SuperDevMode you can only debug your code using the 
>> browser, as thats the one who actually executes the final JS code. You can 
>> either set break points in your browsers dev tools or install the Eclipse 
>> plugin "SDBG" which allows you to set break points in your IDE which are 
>> then synchronized to the browser.
>>
>> -- J.
>>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: best practices for modular GWT app

2016-10-14 Thread Thomas Broyer


On Friday, October 14, 2016 at 10:20:28 AM UTC+2, Kirill Prazdnikov wrote:
>
> Well, my suggestion was only two modules:
>   1. GWT code - builds the client app
>   2. platform independent code (jar) for some logic shared between, for 
> example, server app
>
> Is it incorrect ?
>

And so you choose to bundle your sources into your JAR and thus deploy them 
in production.
There's nothing wrong with that, but it adds "bloat" to the final 
deliverable only to save you a couple lines in your POMs (btw, as soon as 
you declare a new , the default src/main/resources is ignored, 
and needs to be redeclared explicitly)

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Errors in com/google/gwt/emul/java/lang/String.java

2016-10-13 Thread Thomas Broyer
The problem is that you have a mix of rc2 and rc3 libs in your classpath, 
and this is because org.codehaus.mojo:gwt-maven-plugin itself brings GWT 
dependencies (with the same version as the plugin, as a convention).
See 
http://gwt-maven-plugin.github.io/gwt-maven-plugin/user-guide/using-different-gwt-sdk-version.html;
 
or use rc3 of the plugin too.

On Thursday, October 13, 2016 at 6:42:31 PM UTC+2, Teletin Alin wrote:
>
> Hi all,
>
> I have the following error at compilation:
>
> Errors in com/google/gwt/emul/java/lang/String.java
> [INFO] [ERROR] Line 165: 'String.NativeFunction 
> String.getFromCharCodeFunction()' has invalid name 'String.fromCharCode'.
> [INFO] [ERROR] Line 165: 'String.NativeFunction 
> String.getFromCharCodeFunction()' has invalid namespace ''.
> [INFO] [ERROR] Line 757: 'String.NativeString' has invalid 
> namespace ''.
> [INFO]   [ERROR] Compiler returned false
>
> The pom.xml versions for gwt:
> 2.8.0-rc2-patched
> 2.8.0-rc3
>
> I search for the issue and there are only 2 relevant discussions:
>
>
> https://groups.google.com/forum/#!topic/Google-Web-Toolkit-Contributors/4IY_L0Hj1cU
> and
> https://github.com/gwtproject/gwt/issues/9423 (I think the commit from 
> here is causing the issue).
>
> But I don't get from those discussions how to fix the issue.
> Can you please help me?
>
> Thank you,
> Alin T.
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Replcaing GWT generators with APT - Annotation Processing Tool -

2016-10-08 Thread Thomas Broyer


On Saturday, October 8, 2016 at 12:14:29 AM UTC+2, Ahmad Bawaneh wrote:
>
> Dears,
> We all know that GTW 3.0 will come with some major changes from the 
> current GWT, and so we find every were suggestions for how to be prepared 
> for these changes, and that is good, but here is my issue regarding the 
> removal of generators and the suggestion to replace them with Annotation 
> processors:
>
> I have been using generators to build some kind of registry, so a 
> developer can annotate a class with an annotation and using the generators 
> i generate the code that register that class in the registry to picked up 
> at run-time, which is the normal case here, but in my case developer write 
> there own modules in seperate projects and provides me with the final 
> artifact, and since in my generator i scan the class path i was able to 
> find the annotated classes within these third party jars and register them.
>
> that worked perfectly for me.
>
> now i have trying to replace my generators with annotation processors, but 
> annotation processors does not scan classes from third party jars as it 
> only works for source code, and now if i want things to work for me i have 
> to ask every one to write thier projects as part of my project - thier 
> projects source code should be part of my project -.
>
> and with this modularity is 100% been killed.
>

No.
First, APT can work on already-compiled 
classes: http://docs.oracle.com/javase/8/docs/technotes/tools/windows/javac.html
The main issue here is that a) you have to know the class names you want to 
process (you can use a tool to scan a classpath, such as scannotation, to 
get that list) and b) most build tools don't have built-in support for 
passing class names to JavaC, rather than source files.
But one would argue that classpath scanning is bad (at least if there's no 
alternative).
A better approach is to use a service loader-like approach (not 
service-loader as you don't seem to be forcing a base class/interface): 
each JAR lists its classes in a specific file in META-INF, so you just have 
to read all such files from the classpath and you have the list of classes 
you need to process.
But ideally, you'd rather have the "final user" explicitly list what it 
needs (a classpath scanner to create such a list would be one way to do it, 
but the developer could prefer tailoring the list by hand)
 

> So is APT the right choice?
>

Probably not, or at least it would be only part of the solution. Some kind 
of "preprocessor" would be better suited (it could possibly generate a Java 
source file that'd later trigger an annotation processor).

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to use devModeArgs in net.ltgt.gwt.maven Plugin ?

2016-10-06 Thread Thomas Broyer
You're trying to pass two arguments here, so you have to use two elements:


  
-servercom.google.appengine.tools.development.gwt.AppEngineLauncher


Note that Maven will accept both  and , so I tend to use 
 as it's much shorter. I like to also put both elements on the same 
line when they are logical "key value" pairs.

On Thursday, October 6, 2016 at 12:22:40 PM UTC+2, zakaria amine wrote:
>
> Hello, 
>
> I am trying to give the gwt dev mode additional options using devModeArgs :
>
>   
>   -server 
> com.google.appengine.tools.development.gwt.AppEngineLauncher
> 
>
> but I get an error when runnign gwt:devmode goal: Unknown argument: 
> -server com.google.appengine.tools.development.gwt.AppEngineLauncher
>
> is this the correct usage? 
>
> Thanks. 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GSS changes aren't recognized in SDM

2016-10-05 Thread Thomas Broyer
IIRC, Eclipse does it for you automatically on save.

FWIW, this is because resources can be filtered (placeholders replaced with 
property values) and/or relocated, so using the "sources" directly could cause 
issues.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GSS changes aren't recognized in SDM

2016-10-05 Thread Thomas Broyer
Do you "mvn process-resources" when you change something in 
src/main/resources?

On Wednesday, October 5, 2016 at 2:12:07 PM UTC+2, N Troncoso wrote:
>
> I'm starting a new project using GWT 2.8-rc2, and am setting up my GSS 
> resources. It all works and the pages render correctly, but if I change a 
> GSS file, the changes aren't loading when I refresh the browser.
>
> I have my ResourceBundles in 
> *src/main/java/com/company/project/client/resources*
>
> And I have my gss files in 
> *src/main/resources/com/company/project/client/resources/gss*
>
> So, when setting up my ResourceBundle, I do *@Source("gss/style.gss")*
>
> Just in case this is relevant, here are the properties in my gwt.xml file 
> for GSS:
>
> 
>  "strict" />
>
> This works, but like I said, if I make a change in style.gss, the change 
> is not loaded when refreshing the browser. I have to stop the codeserver 
> and restart it
>
> I don't think this matters, but the way I set up my resources is to have a 
> CssResource per gss file. Then, I have a singleton Resource.java class. In 
> it, I have a single ClientBundle that hooks each CssResource to its gss 
> file. Then, I create static methods for each Resource. It looks like this:
>
> public class Resources
> {
> public static interface ResourceBundle extends ClientBundle
> {
> @Source("gss/flex.gss")
> FlexStyleResource flex();
>
> @Source("gss/colors.gss")
> ColorResource col();
>
> @Source("gss/fonts.gss")
> FontResource font();
>
> @Source("gss/widgets.gss")
> WidgetResource widget();
> }
>
> private static Resources INSTANCE;
>
> public synchronized static Resources get()
> {
> if (INSTANCE == null)
> {
> INSTANCE = new Resources();
> }
>
> return INSTANCE;
> }
>
> public static FlexStyleResource flex()
> {
> return get().resources.flex();
> }
>
> public static ColorResource col()
> {
> return get().resources.col();
> }
>
> public static FontResource font()
> {
> return get().resources.font();
> }
>
> public static WidgetResource widget()
> {
> return get().resources.widget();
> }
>
> private final ResourceBundle resources;
>
> public Resources()
> {
> resources = GWT.create(ResourceBundle.class);
> }
>
> public void init()
> {
> resources.flex().ensureInjected();
> resources.col().ensureInjected();
> resources.widget().ensureInjected();
> resources.font().ensureInjected();
> }
> }
>
> And so, when I need something, I can do *Resources.col().primaryColor()* for 
> example. *Note*: I call init() in my EntryPoint.onModuleLoad()
>
> Thanks in advance for any advice
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to remove EventListener

2016-10-05 Thread Thomas Broyer


On Wednesday, October 5, 2016 at 12:59:53 PM UTC+2, Henrik wrote:
>
> Surprised at your reaction to this.  I find myself doing the same more and 
> more as I'm using less and less widgets.  Is there a better way when 
> dealing with non-widget elements?
>

Use JsInterop (and/or Elemental) to directly add a @JsFunction?
Or use event delegation at the enclosing widget (if/when there's one)

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT RC2 with Polymer: Issue while calling click handler from Java.

2016-10-05 Thread Thomas Broyer


On Wednesday, October 5, 2016 at 12:59:29 PM UTC+2, GAURAV GUPTA wrote:
>
> Hi All,
>
> I am using below code for creating my custom element, 
>
> package com.test;
>
> import jsinterop.annotations.JsConstructor;
> import jsinterop.annotations.JsMethod;
> import jsinterop.annotations.JsType;
>
> import com.google.gwt.event.dom.client.ClickEvent;
> import com.google.gwt.event.dom.client.ClickHandler;
> import com.google.gwt.user.client.Window;
> import com.google.gwt.user.client.ui.Button;
>
> @JsType(namespace = "ctb")
> public class CustomGWTButton{
> @JsConstructor
> public CustomGWTButton() {
> }
> @JsMethod
> public Button getButton(){
> //#1 java handler not working
> return new Button("Test11", new ClickHandler() {
> @Override
> public void onClick(ClickEvent event) {
> Window.alert("How are you?"); 
> }
> });
> }
> }
>
>
> 
> 
> 
> 
> 
> Hello
> 
> 
> 
> Polymer({
> is: "gwt-button",
> attached: function(){
> var obj = new ctb.CustomGWTButton();
> var button = obj.getButton();
> //*#2* not working 
> button.onclick = function(){
> alert('Not Working Fine!!');
> }
> var line = document.createElement("p");
> line.innerHTML = button;
> document.getElementById("buttonId").appendChild(line);
> //when I do like this, it is working
> var ch = line.childNodes[0];
> ch.onclick = function(){
> alert('Working Fine!!');
> }
> }
> });
> 
> 
>
> Below issues I am facing (RED COLOR handlers not working):
> 1. Click handler defined in java class not working (#1).
>

This is because the widget is never "attached", so the event handler is 
never actually added (sinkEvents is not called).
See 
http://googlewebtoolkit.blogspot.fr/2009/05/widget-best-practices-widget-building.html
 
for example about the widgets lifecycle.
 

> 2. Then I tried to add onclick in javascript (#2) but it also didnt 
> worked for me.
>

This is because 'button' is a Button widget, not a  DOM element 
(HTMLButtonElement in JS).
 

> 3. then I again added onclick Handler in javascrpt (#3), It worked for 
> me. 
>

This is because when you did line.innerHTML=button it called the button's 
toString(), which happens to be calling toString() on its underlying 
HTMLButtonElement DOM element, which will end up as something like Test11.
When getting that element (which will *not* be the button backing the 
Button widget in your CustomGWTButton class, but a new one, a copy with the 
same HTML representation), you can now add a click handler, as it'll be an 
HTMLButtonElement DOM element.
 

> Can you please help me, How I can make work java handler #1 and #2 
> handler here.
>

Easiest would be to not mix widgets and non-widgets (DOM elements), and use 
Elemental or JSNI or JsInterop or whatever to attach an event listener for 
the click event.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: NoClassDefFoundError (HttpSessionIdListener) when launching SDM, after switching from gwt-2.8.0-beta1 to rc2

2016-10-05 Thread Thomas Broyer
Or maybe adjust the classpathScope to include provided 
dependencies? 
http://tbroyer.github.io/gwt-maven-plugin/devmode-mojo.html#classpathScope 
/ http://tbroyer.github.io/gwt-maven-plugin/codeserver-mojo.html#classpathScope
(see also the samples from the GWT SDK, or the POM generated by 
webAppCreator)

On Wednesday, October 5, 2016 at 2:13:26 PM UTC+2, N Troncoso wrote:
>
> For anyone with the same issue as me, I had to remove the 
> *provided* in the dependency management for javax.servlet
>
> On Monday, October 3, 2016 at 9:22:48 AM UTC-4, N Troncoso wrote:
>>
>>
>> I'm having the same issue as Boris, except my dependency tree shows that 
>> I'm using 3.1:
>>
>> [INFO] +- com.google.gwt:gwt-user:jar:2.8.0-rc2:compile
>> [INFO] |  \- javax.servlet:javax.servlet-api:jar:3.1.0:provided (scope 
>> managed from compile)
>> [INFO] \- com.google.gwt:gwt-dev:jar:2.8.0-rc2:compile
>> [INFO]\- org.eclipse.jetty:apache-jsp:jar:9.2.14.v20151106:compile
>> [INFO]   +- 
>> org.eclipse.jetty:jetty-server:jar:9.2.14.v20151106:compile
>> [INFO]   |  \- (javax.servlet:javax.servlet-api:jar:3.1.0:provided - 
>> scope managed from compile; omitted for duplicate)
>> [INFO]   \- (javax.servlet:javax.servlet-api:jar:3.1.0:provided - 
>> scope managed from compile; omitted for duplicate)
>>
>> The only place this is specified is in the parent pom:
>>
>>
>> 
>> 
>> 
>> com.google.gwt
>> gwt
>> 2.8.0-rc2
>> pom
>> import
>> 
>> 
>> javax.servlet
>> javax.servlet-api
>> 3.1.0
>> provided
>> 
>> 
>> 
>>
>> I get the exact same error that he posted when trying to run the 
>> codeserver. The only difference is that he's using 
>> *gwt-maven-plugin:1.0-rc-4* and I'm using *gwt-maven-plugin:1.0-rc-6*
>>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to remove EventListener

2016-10-04 Thread Thomas Broyer


On Tuesday, October 4, 2016 at 1:04:06 AM UTC+2, David wrote:
>
> I use the following code to create an EventListener:
>
>   Event.sinkEvents(divElement, Event.ONCLICK);
>  final EventListener listener = new EventListener() 
> {...};
>  Event.setEventListener(divElement, listener);
>

Please tell me this is legacy code from GWT 1.x times…
(why not use a widget? or event delegation?)
 

> How do I remove EventListener late if I don't want to delete the created 
> divElement?
>

If you want to stop listening to all events (and easily reattach the 
listener later on, triggered on the same events):
Event.setEventListener(divElement, null);
to stop listening to click events:
Event.sinkEvents(divElement, 0); // unsinks all events, but you only had 
ONCLICK
or
Event.sinkEvents(divElement, Event.getEventsSunk() & ~Event.ONCLICK);
 

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


GWT google crawler error undefined.cache.js

2016-09-30 Thread Thomas Broyer
Have you tried set-property-fallback?

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT 2.8 RC2 with Polymer : Creating custom element using JsInterop

2016-09-30 Thread Thomas Broyer
Well, Vaadin's gwt-polymer-elements have moved to JsInterop 
1.0: https://github.com/vaadin/gwt-polymer-elements

On Friday, September 30, 2016 at 3:56:30 PM UTC+2, GAURAV GUPTA wrote:
>
> Thanks Thomas for quick response, do you see any example using GWT 
> elements to create custom elements using Polymer.
>
> Regards,
> Gaurav
>
> On Friday, 30 September 2016 17:46:41 UTC+5:30, Thomas Broyer wrote:
>>
>> JsExport has been replaced by JsType, JsConstructor, JsMethod and 
>> JsProperty; see 
>> https://docs.google.com/document/d/10fmlEYIHcyead_4R1S5wKGs1t2I7Fnp_PaNaa7XTEk0
>>  
>> (link comes from 2.8 beta release notes)
>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT and Oracle

2016-09-30 Thread Thomas Broyer

On Friday, September 30, 2016 at 3:03:33 PM UTC+2, Eric Nissan wrote:
>
> Hey just curious, does Oracle contribute to GWT at all?  I know they are 
> in a battle with Google over Java (android), but one would think they could 
> put that aside and contribute as GWT really does encourage Java usage.
>

If they ever contributed to GWT, that was undercover ;-)

No, Oracle has been pushing JavaFX for building so-called RIAs; it's a 
different programming and deployment model, that's going to fail miserably 
(like Silverlight, and Java applets and web start before them) but well, 
they're short-sighted and have deep pockets so… (just like they've been 
pushing J2ME for years after feature phones were almost dead and replaced 
with iOS and Android smartphones; are about to ship "project jigsaw" in 
Java 9 when almost everybody turned their back on OSGi, and are only just 
starting to look at what Java EE could like in the cloud-oriented world we 
live in for a few years now)

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


GWT 2.8 RC2 with Polymer : Creating custom element using JsInterop

2016-09-30 Thread Thomas Broyer
JsExport has been replaced by JsType, JsConstructor, JsMethod and JsProperty; 
see 
https://docs.google.com/document/d/10fmlEYIHcyead_4R1S5wKGs1t2I7Fnp_PaNaa7XTEk0 
(link comes from 2.8 beta release notes)

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT Maven project made with WebAppCreator don't work in devmode

2016-09-28 Thread Thomas Broyer
I answered on SO: https://stackoverflow.com/a/39750766/116472

On Wednesday, September 28, 2016 at 3:51:20 PM UTC+2, Vit Vyaz wrote:
>
> Hi, all
>
>
> I have created a GWT project with maven configuration on this way:
>
> webAppCreator -out HelloWorldGWT -templates sample,maven,readme 
> ua.vitvyaz.hellowordgwt.HelloWorldGWT
>
>
> I tried to run project on devmode:
>
> mvn gwt:devmode
>
>
> But in the browser I got:
>
> "HTTP ERROR 404
>
>
> Problem accessing /HelloWorldGWT.html.
>
> Reason: Not Found"
>
> I looked, the directory WEB-INF was empty.
>
>
> What is wrong in pom.xml? pom.xml:
>
> 
> http://maven.apache.org/POM/4.0.0"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
> http://maven.apache.org/maven-v4_0_0.xsd";>
>
>   
>   4.0.0
>   ua.vitvyaz.hellowordgwt
>   HelloWorldGWT
>   war
>   1.0-SNAPSHOT
>   ua.vitvyaz.hellowordgwt.HelloWorldGWT
>
>   
>
> 
> 1.8
> 1.8
>
> 
> UTF-8
> UTF-8
>   
>
>   
> 
>   
>   
> com.google.gwt
> gwt
> 2.8.0-rc1
> pom
> import
>   
> 
>   
>
>   
> 
>   com.google.gwt
>   gwt-servlet
>   runtime
> 
> 
>   com.google.gwt
>   gwt-user
>   provided
> 
> 
>   com.google.gwt
>   gwt-dev
>   provided
> 
> 
>   junit
>   junit
>   4.11
>   test
> 
>   
>
>   
> 
> 
> ${project.build.directory}/${project.build.finalName}/WEB-INF/classes
>
> 
>
>   
>   
> net.ltgt.gwt.maven
> gwt-maven-plugin
> 1.0-rc-6
> 
>   
> 
>   import-sources
>   compile
>   import-test-sources
>   test
> 
>   
> 
> 
>   ua.vitvyaz.hellowordgwt.HelloWorldGWT
>   HelloWorldGWT
>   true
>   
>   1.8
>   
>   
> 
> -compileReport
> -XcompilerMetrics
>   
>   
>   
> ${project.build.directory}/${project.build.finalName}
>   compile+runtime
>   
>   
> HelloWorldGWT.html
>   
> 
>   
>
>   
>   
> maven-surefire-plugin
> 2.17
> 
>   true
> 
>   
>
> 
>   
> 
>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: [GWT 2.8 SHNAPSHOT] missing stack trace for 'Should only call onDetach when the widget is attached to the browser's document'

2016-09-27 Thread Thomas Broyer
How about setting a breakpoint at the throw line in Widget onDetach then?

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: SDM Class replacement problem

2016-09-27 Thread Thomas Broyer
Double check your classpath order, and/or possibly pass your source tree 
root folder as -src to SDM instead of adding it to the classpath.

On Tuesday, September 27, 2016 at 3:44:44 PM UTC+2, Alexander Tarasov wrote:
>
> Hi.
> I need to replace some abstact class from external library.
> I've created the same package as in class and put there modified class.
> In PROD mode everything works fine, but SDM does not see this file and 
> compiles the original one.
> Is it a bug? 
> Is there any solution to force SDM to look up for modified files?
> Thanks in advance.
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: JsInterop and constants

2016-09-27 Thread Thomas Broyer

On Tuesday, September 27, 2016 at 1:36:13 PM UTC+2, Kirill Prazdnikov wrote:
>
> or you want a Java-only field in that interface (like you had in your JSO 
>> previously), and then you need to use @JsOverlay.
>>
>
> Yes, I want Java-only scalars. Web GL constant pool has about 150 fields. 
> Should I add JsOverlay 150 times ? 
> Is it possible for GWT to automatically look at scalar constants (static 
> final primitive types) as if they are JsOverlay ? 
>

Well, it could be (feel free to file an issue) but it won't make it into 
2.8.0 (possibly 2.8.1 though; given that it'd be backwards-compatible).

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: JsInterop and constants

2016-09-27 Thread Thomas Broyer


On Tuesday, September 27, 2016 at 11:03:17 AM UTC+2, Kirill Prazdnikov 
wrote:
>
> Hi, 
>
> It is not clear why GWT disallow scalar and String constants in JsInterop 
> interfaces
> Previously it was
>
> public final class MediaError extends JavaScriptObject {
>   public static final int MEDIA_ERR_ABORTED = 1;
>
>
> Now it is impossible to declare the constant in the API declaration:
>
> @JsType(isNative = true, namespace = JsPackage.GLOBAL)
> public interface MediaError {
>   @JsProperty int getCode();
>
>   int MEDIA_ERR_ABORTED = 1;
>
> }
>
>
> [ERROR] Line 11: Native JsType field 'int MediaError.MEDIA_ERR_ABORTED' 
> cannot have initializer.
>
> How can I add the constants ? 
> How can I enable scalar constants in @JsType interfaces ?
>
>
AIUI, either you map a JS constant to Java, and then you shouldn't use an 
initializer (but then you cannot use an interface); or you want a Java-only 
field in that interface (like you had in your JSO previously), and then you 
need to use @JsOverlay.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to debug server side code in Thomas Broyer GWT Maven Plugin

2016-09-26 Thread Thomas Broyer


On Monday, September 26, 2016 at 3:02:37 PM UTC+2, David wrote:
>
> Thomas,
>
> I am not very familiar with Maven in Eclipse. I use Eclipse 4.6. Once I 
> run "Debug as… → Maven", I see there are a lot of choices such as 
> Maven build
> Maven build...
> Maven clean
> Maven generate-sources
> Maven install
> Maven test.
>
> I cannot figure it out how. Can you give me step-to-step instruction?
>

I don't use Eclipse (any longer), but IIRC, use "Maven build…" here, then 
in the window that opens you can give your -pl and -am (in the "goals" 
field, and define the 'env' system property with value 'dev' (or maybe just 
pass -Denv=dev)
https://books.sonatype.com/m2eclipse-book/reference/running-sect-running-maven-builds.html
 
(note: that "book" might be outdated)
 

> I am very familiar with how to debug GWT application not using Maven.
>

You're not trying to debug a "GWT application" here actually, but a "web 
application". GWT is an implementation detail of your servlets as far as 
the server-side is concerned.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to debug server side code in Thomas Broyer GWT Maven Plugin

2016-09-26 Thread Thomas Broyer

On Monday, September 26, 2016 at 1:40:47 PM UTC+2, David wrote:
>
> Thomas,
>
> Once I run "mvnDebug tomcat7:run -pl *-server -am -Denv=dev" from a 
> command line, I just got the following message:
>Listening for transport 
> dt_socket at address: 8000
>

This tells you on which port you'll attach the Java debugger. From Eclipse, 
you then create a debug launcher for a "remote application" and select the 
dt_socket transport and 8000 port. Once the Java debugger is connected, the 
execution is resumed.
It's actually easier to do a "Debug as… → Maven…" in Eclipse.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Trailing _0 in variable names and -generateJsInteropExports flag

2016-09-26 Thread Thomas Broyer


On Monday, September 26, 2016 at 11:50:22 AM UTC+2, Yann Vo wrote:
>
> Hello,
>
> I just raised https://github.com/gwtproject/gwt/issues/9431 for which I 
> had a quick rely (thanks for that!) but... it was closed and flagged 
> invalid.
>
> Rather than polluting the bug database further, I open this thread (which 
> I would have done initially if I had not considered this behavior as a 
> regression wrt 2.8beta1).
>
> Now my question: I have done the suggested change: I added 
> -generateJsInteropExports in my compile command, but it does not seem to 
> do any good...
>
> See 
> https://github.com/jandsu/gwt-webworker/commit/37e4751bf5c1a914a65df8c8da9e5d311f55e78f
>
> Whether I add -nogenerateJsInteropExports or -generateJsInteropExports 
> does not seem to change anything (and if I make an intentional typo 
> -nogenerateJsInteropExportypos, the compiler yells which proves that my 
> flags are properly passed to the compiler).
>
> After some research I am still stuck... Can it be that my custom linker 
> (to make the generated code work in a web worker) is the cause of the 
> problem?
>

I just cloned your repository (at 37e4751bf5c1a914a65df8c8da9e5d311f55e78f) 
and ran a "./gradlew gwtCompile", and the generated JS has:
_.onMessage = function onMessage(message){
  var msg;
  msg = new cewd.MyWorkerMessage;
  msg.code = 'OK';
  msg.payload = cew.createBuffer(50);
  this.postMessage_0(msg);
}
;

So it seems to be working as intended.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to debug server side code in Thomas Broyer GWT Maven Plugin

2016-09-26 Thread Thomas Broyer


On Monday, September 26, 2016 at 5:59:50 AM UTC+2, David wrote:
>
> I used Thomas Broyer GWT Maven Plugin to create a maven GWT project from a 
> command and imported into Eclipse 4.6. I can run Jetty and Tomcat and 
> application works fine. But I want to debug server side code. I cannot 
> figure out how to debug server side code. I set up a break point in server 
> side code, but it doesn't stop there.
>

With their respective Maven plugins, Tomcat and Jetty run in the Maven 
process, so you "just" run Maven in debug mode (either "mvnDebug 
tomcat7:run" instead of "mvn tomcat7:run"; or "Debug as… → Maven…" from 
within Eclipse, instead of "Run as… → Maven…")
You can also run the webapp using Eclipse WTP (or whatever it's called) by 
defining a "Server", without using Maven in this case.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Refresh of CellTable via data transmitted via WebSocket delayed

2016-09-23 Thread Thomas Broyer


On Friday, September 23, 2016 at 2:04:19 AM UTC+2, Kay Pac wrote:
>
> I have a somewhat complex problem related to a CellTable that updates 
> based on messages received over a WebSocket connection. The problem is as 
> follows: The table does not update in real-time, even though "setRowData" 
> and redraw* are called in real-time. There is a delay in the row appearing 
> in the CellTable, or rather in the DOM as a table row. I realize that 
> redraw does not actually redraw but sets a flag via 
> HasDataPresenter.redraw, which checked elsewhere. It is often the case that 
> mouse movement causes the row to appear - and I have been able to reproduce 
> this behavior. When I put in a timer firing every 300 milliseconds, its 
> execution also causes the row to appear.
>

That hints at the callback that calls the setRowData and redraw not being 
wrapped in $entry().
CellTable defers its DOM update using Scheduler.scheduleFinally(), and 
"finally commands" (and "entry commands") are processed by $entry().
So, your callback schedules a finally task, but because it's not in 
$entry() it's not called "at the end of the event loop" as it's expected 
to; it's actually called at the end of the next event loop that uses 
$entry(), which is the case for almost anything that GWT does: event 
handlers, timers, etc.
So: make sure your WebSocket's callback is wrapped in $entry() (this also 
takes care of the GWT.UncaughtExceptionHandler btw)

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Update conversation by displaying new messages when they are sent

2016-09-21 Thread Thomas Broyer


On Wednesday, September 21, 2016 at 4:43:45 PM UTC+2, JonL wrote:
>
> Others have suggested websockets, but there are several other options as 
> well.  There is google cloud messaging and many other libraries to solve 
> this problem as well as ServerSent Events.
>
> http://www.html5rocks.com/en/tutorials/eventsource/basics/
>

Unfortunately, and surprisingly, EventSource isn't supported in Microsoft 
browsers, contrary to WebSocket!
http://caniuse.com/eventsource vs. http://caniuse.com/websockets

If none of those are options, try to avoid using a regular timer.  More 
> timers, more problems.  If you must use a timer like object, I would 
> suggest using gwt Scheduler instead.
>

Most importantly, schedule the task again from the RPC callback, do not 
schedule a repeating task (in other words, in JS terms, use setTimeout, do 
not use setInterval)
 

> On Tuesday, September 20, 2016 at 2:38:11 AM UTC-7, Olar Andrei wrote:
>>
>> Hello,
>>
>> In my GWT application I have a messaging system integrated within. When a 
>> specific conversation gets opened, a query runs and selects all messages 
>> available for this conversation. From the same view you can reply to that 
>> conversation. When replying, the other user has to click a small refresh 
>> button (located on top, which agian gets all mesages from the DB running 
>> the same query from above) in order for the last message to appear.
>>
>> My question: How can I make that refresh automatically, so you don't have 
>> to click on the button in order to refresh the conversation. Like in FB, 
>> Messenger, etc, where you don't refresh the conversation and the messages 
>> keep coming without you having to do anything.
>>
>> Thanks in advance.
>>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Extending native JsTypes from Java with GWT 2.8.0-rc2

2016-09-21 Thread Thomas Broyer
It should be possible, from 
spec: 
https://docs.google.com/document/d/10fmlEYIHcyead_4R1S5wKGs1t2I7Fnp_PaNaa7XTEk0/edit#heading=h.aaedpeo8ehl8

Can you file a bug in the issue 
tracker? https://github.com/gwtproject/gwt/issues

On Wednesday, September 21, 2016 at 9:38:16 AM UTC+2, Nándor Előd Fekete 
wrote:
>
> Hi everyone!
>
> Are we supposed to be able to extend native (browser) JsTypes from Java? 
> Specifically, having the following declaration (from Elemental2):
>
> @JsType(isNative = true, namespace = JsPackage.GLOBAL)
> public class HTMLDivElement extends HTMLElement {...}
>
> and the extending type
>
> public class DummyElement extends HTMLDivElement {...}
>
> I'm getting TypeError: Illegal invocation from the compiled js code when 
> it tries to define the class 
> (com.google.gwt.lang.Runtime.copyObjectProperties 
> (Runtime.java:104)), while copying native properties from the extends js 
> type's prototype. The property in this case is 'align' but it happens on 
> other browser native properties too.
>
> Thanks for the help!
>
> All the best,
> Nandi.
>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT2.8RC2 : compile time user.agent value (safari) does not match the runtime user.agent value (gecko1_8) ?

2016-09-16 Thread Thomas Broyer
This will be the goal with GWT 3 I believe.
But what do you mean by "default permutation"? Which user.agent value?

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: jsinterop and Scheduler.scheduleFinally

2016-09-16 Thread Thomas Broyer

On Friday, September 16, 2016 at 2:54:20 PM UTC+2, Pavel Kakolin wrote:
>
> Imagine an @JsType(isNative = true) EventTarget (basically Element) with 
> @JsMethod addEventListener(final String type, final EventListener 
> listener).
>
> We have a "mousedown" event listener and inside that listener we 
> call 
> com.google.gwt.core.client.Scheduler#scheduleFinally(com.google.gwt.core.client.Scheduler.ScheduledCommand).
>
> The problem is the ScheduledCommand is never executed after when mousedown 
> event is fired. Scheduler.scheduleDeferred works as expected.
>

Are you sure it's *never* executed? (vs. executed in the "finally" of 
another, later "event"?)
 

> Is it correct behaviour?
>

Actually, yes.
The thing is that JsInterop is "close to the metal", and won't wrap your 
JsFunction into $entry() (which takes care of scheduleEntry and 
scheduleFinally commands, and GWT.UncaughtExceptionHandler)
I *think* it's by-design.
See 
https://gwt-review.googlesource.com/#/q/file:user/src/com/google/gwt/core/client/internal/Entry.java
 
for examples of rewriting GWT internals with JsInterop, that explicitly 
$entry-wrap JsFunction⋅s (that's what's making me say it's by-design)
 

> Is there any right way to scheduleFinally from inside event listeners 
> added to elements using jsinterop?
>

You'd have to somehow wrap your JsFunction into $entry() and actually pass 
the $entry-wrapped function to your addEventListener.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Strange (BAD?) code generated

2016-09-15 Thread Thomas Broyer
With GWT 2.8 yes. It's been suggested that there could be some regexp (or 
other kind of pattern) matching added later to whitelist/blacklist some 
@JsType(isNative=false) that you would/wouldn't want to see exported.
In the mean time, don't over-use @JsType without isNative=true (in 
libraries), better (if possible) separate exported types to a specific 
"application" project to be compiled to a standalone JS script.

Note that for the java.util.List et al. currently annotated with @JsType, 
the overhead was deemed small enough (because that's only 4 classes without 
that many subclasses).

My suggestion would be, for GWT 2.8, to only use JsInterop for mapping 
native objects (i.e. only isNative=true).
Google likely uses JsInterop with isNative=false but with 
-closureFormattedOutput and an additional round of Closure Compiler 
optimisations that would prune unused code and re-obfuscate the names.

On Thursday, September 15, 2016 at 11:01:14 AM UTC+2, Vassilis Virvilis 
wrote:
>
> So
> What you say is: It is not possible to have a page with: 
> *** gwtapp + gwtlib + js_export + optimization ***
>
> What is possible to have is either or
>
> 1) gwtapp + gwtlib + optimization
>
> or  (xor actually)
>
> 2) gwtapp + gwtlib + js_export
>
> right?
>
> a) We assume gwtlib has @JsType(isNative=false) types
> b) Optimization is used in the broad sense for method and properties 
> renaming, removal and other optimization steps
>
> Jens, Thomas thanks a lot for the education.
>
>Vassilis
>
>
> On Thu, Sep 15, 2016 at 11:44 AM, Thomas Broyer wrote:
>
>> Let me try: without -generateJsInteropExports, GWT acts as if 
>> @JsType(isNative=false) wasn't there at all.
>> Why'd you want this?
>>
>>- when @JsType(isNative=false) is applied to types you didn't write 
>>yourself (third-party). For example, java.util.Collection, 
>> java.util.List, 
>>java.util.Map, java.util.Set, and java.lang.Enum are annotated with 
>>@JsType. If you don't use -generateJsInteropExports, their 
>> non-@JsIgnore⋅d 
>>public members won't be renamed, and the @JsProperty and 
>>@JsMethod-specified names won't be honored, so you'll have very short 
>>(obfuscated) names in your app. If you use -generateJsInteropExports, the 
>>given js-names will be honored and your code will be slightly bigger, but 
>>then you can pass a java.util.List to JS and you can call getAtIndex and 
>>removeAtIndex (for example) on it from JS code.
>>- when you want to possibly export your project as a standalone JS 
>>lib, but have it consumable by GWT apps with all the GWT optimization 
>>goodness: your types will be annotated with @JsType, apps that use your 
>> GWT 
>>library without using -generateJsInteropExports will have 
>> highly-optimized 
>>code; but you can use -generateJsInteropExports to export your annotated 
>>types to create a standalone JS lib. GWT apps consuming your GWT library 
>>and using -generateJsInteropExports will pay the price for your @JsType 
>>though (see example above about java.util.List), so you'll probably want 
>> to 
>>separate out some of your code into a project specific to exporting your 
>> JS 
>>lib (similarly to how GWTUpload/JSUpload did it)
>>That was Jens' example.
>>
>>
>> On Thursday, September 15, 2016 at 10:18:55 AM UTC+2, Vassilis Virvilis 
>> wrote:
>>>
>>> Jens sorry - one more round if you please
>>>
>>> > The library exists as GWT library (*.jar file with *.gwt.xml)...
>>>
>>> This GWT library is source right? That means it is compiled by the 
>>> compilation session of MyApplication right?
>>>
>>> Unless (light bulb goes on)
>>>
>>> In some cases you want the library to act as JS library for one Page but 
>>> for another page you only plan to link it with the GWT MyApplication (and 
>>> not export is as a JS library) where normal optimization techniques apply.
>>>
>>> Is that it? If so tricky...
>>>
>>>
>>> Vassilis
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Thu, Sep 15, 2016 at 1:54 AM, Jens wrote:
>>>
>>>>
>>>> Is this GWT library exported as JS only? ... 
>>>>>
>>>> So I don't get it. What am I missing?
>>>>>
>>>>
>>>> The library exists as GWT library (*.jar file with *.gwt.xml) so you 
>>>> can use it right away in y

Re: GWT2.8RC2 : compile time user.agent value (safari) does not match the runtime user.agent value (gecko1_8) ?

2016-09-15 Thread Thomas Broyer


On Thursday, September 15, 2016 at 11:07:42 AM UTC+2, Thomas Lacroix wrote:
>
> Hi,
> I have an app that automatically reports "Uncaught exception" encountered 
> by users.
> It has been compiled with GWT2.8RC2 and in prod for a few days and it has 
> been reporting a couple of "Uncaught exception" as follow:
>
>  - Uncaught exception: 
> com.google.gwt.useragent.client.UserAgentAsserter$UserAgentAssertionError: 
> Possible problem with your *.gwt.xml module file.
> The compile time user.agent value (safari) does not match the runtime 
> user.agent value (gecko1_8).
> Expect more errors.
>
>  - User agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 
> (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36
>
> I am not sure what that means, if this is a serious error and I am not 
> able to reproduce it in my environnement. Any help ?
> I didn't get this error reported prior to compliation with GWT2.8RC2 (I 
> used 2.4, 2.6, and 2.7) but that might be a coincidence.
>

That error generally means that you have compiled your app with a limited 
set of supported user.agent values (e.g. only one, during development) but 
run it in a user agent that's not in the list.
The "compile time user.agent value" comes from the permutation that's being 
used, and the "runtime user.agent value" is computed at runtime.
They should generally be the same value, because the same computation is 
done to select the appropriate permutation; but if you somehow "bypass" 
that computation by only compiling for a single user.agent (generally to 
speed up compilation during development / debugging), then you might be in 
that situation that they're different.

What's strange here is that the "runtime user.agent value" is gecko1_8 
whereas you're using Chrome (so should be "safari").

Could it be, maybe, someone spoofing his user agent in Chrome to look like 
Firefox and only reloading the hidden iframe after changing the user agent? 
(so the permutation has already been selected for Chrome, but the runtime 
value is now for Firefox)
Or maybe a Firefox user spoofing to look like Chrome but in a broken way 
such that the hidden iframe the GWT code runs in does not see the spoofed 
user.agent (so the top-level window looks like Chrome and selects the 
'safari' permutation –compile time user.agent value– but the iframe sees 
the real user.agent and looks like Firefox –runtime user.agent value) ? 
(that very old Chrome version hints that this could be the case)

FYI, you can disable this with  but I would keep it if I 
were you.

Maybe add the permutation ID (
http://www.gwtproject.org/javadoc/latest/com/google/gwt/core/client/GWT.html#getPermutationStrongName())
 
to the log so you can later compare with your compilation-mappings.txt and 
access logs to see if it's possibly a bug in GWT (I doubt it, but who 
knows?)
Also, based on compilation-mappings.txt, maybe have a look at your access 
logs to see if some user agents load an unexpected permutation, and 
possibly cross-check with other requests from the same user agent (or if 
you trace users with a cookie and have that in your logs, use that to 
possibly find if some people are spoofing the user agent: multiple requests 
by the same user/session with different user agents for instance)

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Strange (BAD?) code generated

2016-09-15 Thread Thomas Broyer
Let me try: without -generateJsInteropExports, GWT acts as if 
@JsType(isNative=false) wasn't there at all.
Why'd you want this?

   - when @JsType(isNative=false) is applied to types you didn't write 
   yourself (third-party). For example, java.util.Collection, java.util.List, 
   java.util.Map, java.util.Set, and java.lang.Enum are annotated with 
   @JsType. If you don't use -generateJsInteropExports, their non-@JsIgnore⋅d 
   public members won't be renamed, and the @JsProperty and 
   @JsMethod-specified names won't be honored, so you'll have very short 
   (obfuscated) names in your app. If you use -generateJsInteropExports, the 
   given js-names will be honored and your code will be slightly bigger, but 
   then you can pass a java.util.List to JS and you can call getAtIndex and 
   removeAtIndex (for example) on it from JS code.
   - when you want to possibly export your project as a standalone JS lib, 
   but have it consumable by GWT apps with all the GWT optimization goodness: 
   your types will be annotated with @JsType, apps that use your GWT library 
   without using -generateJsInteropExports will have highly-optimized code; 
   but you can use -generateJsInteropExports to export your annotated types to 
   create a standalone JS lib. GWT apps consuming your GWT library and using 
   -generateJsInteropExports will pay the price for your @JsType though (see 
   example above about java.util.List), so you'll probably want to separate 
   out some of your code into a project specific to exporting your JS lib 
   (similarly to how GWTUpload/JSUpload did it)
   That was Jens' example.


On Thursday, September 15, 2016 at 10:18:55 AM UTC+2, Vassilis Virvilis 
wrote:
>
> Jens sorry - one more round if you please
>
> > The library exists as GWT library (*.jar file with *.gwt.xml)...
>
> This GWT library is source right? That means it is compiled by the 
> compilation session of MyApplication right?
>
> Unless (light bulb goes on)
>
> In some cases you want the library to act as JS library for one Page but 
> for another page you only plan to link it with the GWT MyApplication (and 
> not export is as a JS library) where normal optimization techniques apply.
>
> Is that it? If so tricky...
>
>
> Vassilis
>
>
>
>
>
>
> On Thu, Sep 15, 2016 at 1:54 AM, Jens wrote:
>
>>
>> Is this GWT library exported as JS only? ... 
>>>
>> So I don't get it. What am I missing?
>>>
>>
>> The library exists as GWT library (*.jar file with *.gwt.xml) so you can 
>> use it right away in your GWT app, but the library is also exported by the 
>> library maintainer to JavaScript so that JavaScript people can also use it 
>> right away by including a *.js file.
>>
>> In that case your app does not want to use -generateJsInteropExports 
>> because it directly uses the GWT library which has @JsType(isNative = 
>> false) all over the place in its Java files. If you would use 
>> -generateJsInteropExport in your app, it would have a negative impact on 
>> your code size because these @JsType classes would not be optimized/pruned 
>> then. Now imagine you have several of such libraries in your app.
>>
>> -- J.
>>  
>>
>
>
>
> -- 
> Vassilis Virvilis
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Strange (BAD?) code generated

2016-09-13 Thread Thomas Broyer

On Tuesday, September 13, 2016 at 5:27:50 PM UTC+2, Kirill Prazdnikov wrote:
>
> This means that the compiler must throw an error:
>
> If a type is not isNative=true
>   and the type is never instantiated
>   and the type is returned form JSNI\JsInterop
>
> right ?
>

No, just like the compiler doesn't generate an error for other cases where 
it's guaranteed you'll have an NPE at runtime, even without jsinterop.

If your GwtNativeUtil.getBoundingClientRect(element) wasn't JSNI and 
returned 'null' (for example, a typo where you write 'if (element != null) 
return null;' instead of 'if (element == null) return null;' and somehow 
the compiler can infer that 'element' won't ever be 'null'; or of course 
the reverse: without the typo and the compiler somehow can infer that 
'element' will always be 'null'), then it'd generate the same code (just 
without the call to getBoundingRect here).

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Strange (BAD?) code generated

2016-09-13 Thread Thomas Broyer

On Tuesday, September 13, 2016 at 4:08:38 PM UTC+2, Kirill Prazdnikov wrote:
>
>
>> See https://github.com/gwtproject/gwt/issues/9330
>> You must be missing an isNative=true on ClientRect 
>>
>
> Ok, but what does it mean when a type has a @JsProperty but it is not 
> "isNative=true" ?
>
> Must each class with JsProperties be "isNative=true" ?
>

See comments on the linked issue: if it's not isNative=true, then from the 
PoV of GWT it's a normal Java type and will be pruned if it's never 
instantiated; unless you -generateJsInteropExports in which case you expose 
its constructor to the JS world (and GWT can no longer tell if it's ever 
instantiated, so it doesn't prune it; if I'm not mistaken).
Because GWT can tell here (you didn't use -generateJsInteropExports, 
right?) that you never instantiate the ClientRect, it prunes it, which 
means that anything that returns it from JS must be returning 'null' or 
'undefined' (remember: you don't instantiate it, and you don't expose a way 
for JS to instantiate it, so it cannot ever be instantiated and it's then 
safe to assume that it can only be null); which leads to this code calling 
null.$_nullMethod(), which is GWT's way of representing 
NullPointerExceptions in JS.

ClientRect here represents/maps an object that comes from the JS world, so 
it should be isNative=true. If you don't use isNative=true, it means it's 
an object from your app that you'll expose for consumption by JS (iff you 
use -generateJsInteropExports; otherwise jsinterop annotations are just 
ignored).

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


<    1   2   3   4   5   6   7   8   9   10   >