[gwt-contrib] Change in gwt[master]: Use JSON.parse() instead of eval() to deserialize rpc callba...

2013-05-21 Thread John Ahlroos

John Ahlroos has posted comments on this change.

Change subject: Use JSON.parse() instead of eval() to deserialize rpc  
callback payload

..


Patch Set 2:

Brian:

The main reason I put up this patch is that currently IE9 is leaking memory  
quite badly for each RPC call you make. The root cause is that eval() on  
IE9 is designed to keep everything evaled in memory until the browsers  
session dies. See  
https://code.google.com/p/google-web-toolkit/issues/detail?id=57366 for  
more details and discussion.


Thanks by the way for the great google doc, hadn't seen it before Thomas  
posted it here. Maybe put it up on the new gwt site in some form?


Thomas, Colin:

Many times it takes an equal amount of effort to create some imaginative  
hack for IE6/7 than to actually create a new feature and support all the  
other browsers. Would gladly see IE6/7 support dropped as soon as possible.  
IE8 is still a headache in some cases but not as much as those two.


Will look into the .concat workaround next, and see if can figure something  
out.


--
To view, visit https://gwt-review.googlesource.com/2900
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6062180397f5fabed1dd5f08140c2bd43a19fa9f
Gerrit-PatchSet: 2
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: John Ahlroos 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: Colin Alworth 
Gerrit-Reviewer: John Ahlroos 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Thomas Broyer 
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Introduces generic Composite widgets.

2013-05-21 Thread Goktug Gokdogan

Goktug Gokdogan has posted comments on this change.

Change subject: Introduces generic Composite widgets.
..


Patch Set 4:

This looks like exactly what I have proposed; you might have missed some of  
the discussion.


It is never safe to keep a reference to an event as domevent are  
implemented with flyweight pattern in GWT SDK; so I don't think that is an  
issue.


--
To view, visit https://gwt-review.googlesource.com/2582
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I41e5c07e978d442db7d8402c57605cec1b3ea09e
Gerrit-PatchSet: 4
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: Goktug Gokdogan 
Gerrit-Reviewer: Jens Nehlmeier 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Matthew Dempsky 
Gerrit-Reviewer: Thomas Broyer 
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Introduces generic Composite widgets.

2013-05-21 Thread Brian Slesinsky

Brian Slesinsky has posted comments on this change.

Change subject: Introduces generic Composite widgets.
..


Patch Set 4:

It might be possible to intercept the events and update the source after  
they're generated:


class ClickSourceFixer extends ClickHandler {
  ClickHandler wrapped;
  Object newSource;
  void onClick(Event e) {
Object oldSource = e.getSource();
e.setSource(newSource);
try {
  wrapped.onClick(e);
} finally {
  e.setSource(oldSource);
}
  }
}

When someone calls foo.addEventHandler, the composite could wrap the  
handler before passing it to the delegate.


But this isn't transparent because someone might keep a reference to the  
event. To fix that we'd have to copy the event. If the composite has its  
own set of event handlers then the event only has to be translated once.  
Perhaps we could have a ForwardingHandlerManager that does this.


--
To view, visit https://gwt-review.googlesource.com/2582
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I41e5c07e978d442db7d8402c57605cec1b3ea09e
Gerrit-PatchSet: 4
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: Goktug Gokdogan 
Gerrit-Reviewer: Jens Nehlmeier 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Matthew Dempsky 
Gerrit-Reviewer: Thomas Broyer 
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [gwt-contrib] Moving mailing lists to @gwtproject.org?

2013-05-21 Thread Matthew Dempsky
On Tue, May 21, 2013 at 7:46 AM, Stephen Haberman
wrote:

> True; I like being optimistic about future growth. :-)
>

:)

Hehe. Selfishly, I'd love to see more conversations from that internal
>  list happen here.
>
> Obviously I understand that, with an internal list, you can reference
> internal paths/code snippets/secret projects/etc. that you otherwise
> would not want non-Googlers knowing about.
>
> But for the more generic stuff (which would be some/most of it?),
> having more knowledge sharing happen publicly would be awesome.
>

Heh.  We do try to encourage reviews to be done externally as much as
possible, and especially now that we're committing to Gerrit directly
that's even more the case.  Also, if an internally discovered bug looks to
be a general issue and not something specific to Google, we try to
encourage filing external bugs rather than keeping it internal.

But otherwise knowledge sharing among our internal users tends to focus on
integrating with Google's internal infrastructure requirements, and so
probably isn't really useful externally.

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Including the module name in the magic sourceURL comment in ...

2013-05-21 Thread Brian Slesinsky

Brian Slesinsky has submitted this change and it was merged.

Change subject: Including the module name in the magic sourceURL comment in  
code generated by the iframe linker. This gives a bit more context in the  
browser debugger, and is especially important when including multiple GWT  
applications on a page, since otherwise they wi

..


Including the module name in the magic sourceURL comment in code generated  
by the iframe linker.
This gives a bit more context in the browser debugger, and is especially  
important when including
multiple GWT applications on a page, since otherwise they will all be  
named "0.js" and the

browser will arbitrarily choose one of them to show.

Change-Id: I4044b777c29b058584efd756a7987244d9f7a158
---
M dev/core/src/com/google/gwt/core/linker/CrossSiteIframeLinker.java
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Daniel Kurka: Verified
  Matthew Dempsky: Verified
  James Nelson: Looks good to me, but someone else must approve
  Brian Slesinsky: Looks good to me, approved



diff --git  
a/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeLinker.java  
b/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeLinker.java

index f629d1a..c7f0128 100644
--- a/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeLinker.java
+++ b/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeLinker.java
@@ -191,7 +191,7 @@

protected String getDeferredFragmentSuffix(TreeLogger logger,  
LinkerContext context,

   int fragment) {
-return "\n//@ sourceURL=" + fragment + ".js\n";
+return "\n//@ sourceURL=" + context.getModuleName() + "-" + fragment  
+ ".js\n";

   }

   @Override
@@ -440,7 +440,7 @@
 // Magic comment serves several purposes:
 // 1. renames strongName to a stable name in browser debugger
 // 2. provides name to scripts installed via eval()
-out.print("\n//@ sourceURL=0.js \n");
+out.print("\n//@ sourceURL=" + context.getModuleName() + "-0.js\n");
 return out.toString();
   }


--
To view, visit https://gwt-review.googlesource.com/2630
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4044b777c29b058584efd756a7987244d9f7a158
Gerrit-PatchSet: 3
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Erik Kuefler 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: Daniel Kurka 
Gerrit-Reviewer: James Nelson 
Gerrit-Reviewer: Matthew Dempsky 
Gerrit-Reviewer: Ray Cromwell 

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Including the module name in the magic sourceURL comment in ...

2013-05-21 Thread Brian Slesinsky

Brian Slesinsky has posted comments on this change.

Change subject: Including the module name in the magic sourceURL comment in  
code generated by the iframe linker. This gives a bit more context in the  
browser debugger, and is especially important when including multiple GWT  
applications on a page, since otherwise they wi

..


Patch Set 3: Code-Review+2

--
To view, visit https://gwt-review.googlesource.com/2630
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4044b777c29b058584efd756a7987244d9f7a158
Gerrit-PatchSet: 3
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Erik Kuefler 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: Daniel Kurka 
Gerrit-Reviewer: James Nelson 
Gerrit-Reviewer: Matthew Dempsky 
Gerrit-Reviewer: Ray Cromwell 
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Introduces generic Composite widgets.

2013-05-21 Thread Goktug Gokdogan

Goktug Gokdogan has posted comments on this change.

Change subject: Introduces generic Composite widgets.
..


Patch Set 4:

I played with a separate method but I didn't find something I like.  
Actually, I quite like our current APIs. Question is, if we would like to  
pay the price of source correction overhead (more code + more complexity)  
for events.


I would expect parent to work as expected in Web Component because that is  
part of their promise; from outside it should work like any other html tag.  
I remember from one of their talks that they are correctly handling the  
events.


--
To view, visit https://gwt-review.googlesource.com/2582
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I41e5c07e978d442db7d8402c57605cec1b3ea09e
Gerrit-PatchSet: 4
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: Goktug Gokdogan 
Gerrit-Reviewer: Jens Nehlmeier 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Matthew Dempsky 
Gerrit-Reviewer: Thomas Broyer 
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Chooses a default GWT source level to match the current java...

2013-05-21 Thread Roberto Lublinerman

Roberto Lublinerman has posted comments on this change.

Change subject: Chooses a default GWT source level to match the current  
java runtime.

..


Patch Set 3:

(1 comment)


File dev/core/src/com/google/gwt/dev/util/arg/SourceLevel.java
Line 68: if (javaSpecLevel >= sourceLevel.javaLevel &&  
javaSpecLevel > result.javaLevel) {

Will fix.


--
To view, visit https://gwt-review.googlesource.com/2910
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I69dc0e9b1ac0ecf9a40ee2a08d8d555319d0af6f
Gerrit-PatchSet: 3
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Roberto Lublinerman 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Matthew Dempsky 
Gerrit-Reviewer: Roberto Lublinerman 
Gerrit-Reviewer: Thomas Broyer 
Gerrit-HasComments: Yes

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Chooses a default GWT source level to match the current java...

2013-05-21 Thread Roberto Lublinerman

Hello Leeroy Jenkins,

I'd like you to reexamine a change.  Please visit

https://gwt-review.googlesource.com/2910

to look at the new patch set (#4).

Change subject: Chooses a default GWT source level to match the current  
java runtime.

..

Chooses a default GWT source level to match the current java runtime.

Now the GWT default source compatibility level will try to match the
system property java.specification.version.

A small refactor in SourceLevel and a fix to apicheck have been made to
allow specifing the java source compatibility level when processing apis
in order to avoid a compile error on an old version of emul.Enum.

Change-Id: I69dc0e9b1ac0ecf9a40ee2a08d8d555319d0af6f
---
M dev/codeserver/java/com/google/gwt/dev/codeserver/Options.java
M dev/core/src/com/google/gwt/dev/CompileTaskOptionsImpl.java
M dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java
M dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java
M dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
M dev/core/src/com/google/gwt/dev/javac/testing/GeneratorContextBuilder.java
M dev/core/src/com/google/gwt/dev/jjs/JJSOptionsImpl.java
M dev/core/src/com/google/gwt/dev/util/Util.java
M dev/core/src/com/google/gwt/dev/util/arg/ArgHandlerSource.java
M dev/core/src/com/google/gwt/dev/util/arg/OptionSource.java
M dev/core/src/com/google/gwt/dev/util/arg/SourceLevel.java
M dev/core/test/com/google/gwt/dev/CompilerTest.java
M dev/core/test/com/google/gwt/dev/javac/CompilationStateTestBase.java
M dev/core/test/com/google/gwt/dev/jjs/impl/JJSTestBase.java
M dev/core/test/com/google/gwt/dev/util/UtilityTest.java
M tools/api-checker/config/gwt25_26userApi.conf
M  
tools/api-checker/src/com/google/gwt/tools/apichecker/ApiCompatibilityChecker.java

M tools/api-checker/src/com/google/gwt/tools/apichecker/ApiContainer.java
18 files changed, 169 insertions(+), 47 deletions(-)


--
To view, visit https://gwt-review.googlesource.com/2910
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I69dc0e9b1ac0ecf9a40ee2a08d8d555319d0af6f
Gerrit-PatchSet: 4
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Roberto Lublinerman 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Matthew Dempsky 
Gerrit-Reviewer: Roberto Lublinerman 
Gerrit-Reviewer: Thomas Broyer 

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Introduces generic Composite widgets.

2013-05-21 Thread Brian Slesinsky

Brian Slesinsky has posted comments on this change.

Change subject: Introduces generic Composite widgets.
..


Patch Set 4:

Fair enough - I don't understand the particular use cases. My point is that  
we should make sure they work before committing to an API.


It seems like for the UIBinder case we're talking about PanelComposite and  
in that case the delegate is straightforward - it's the place where  
children are added. (It will still break encapsulation somewhat because  
when the child asks for its parent it will be different than what you'd  
expect.) I wonder what web components do?


I don't know if we can achieve complete encapsulation given our existing  
API's. Probably the best to hope for would be to avoid being too surprising.


About the current API: do we necessarily want the delegate to be passed to  
initWidget? Maybe there should be a separate setDelegate() method instead.


--
To view, visit https://gwt-review.googlesource.com/2582
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I41e5c07e978d442db7d8402c57605cec1b3ea09e
Gerrit-PatchSet: 4
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: Goktug Gokdogan 
Gerrit-Reviewer: Jens Nehlmeier 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Matthew Dempsky 
Gerrit-Reviewer: Thomas Broyer 
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Introduces generic Composite widgets.

2013-05-21 Thread Goktug Gokdogan

Goktug Gokdogan has posted comments on this change.

Change subject: Introduces generic Composite widgets.
..


Patch Set 4:

It doesn't work with UIBinder because you are changing the expected  
semantics of a widget. So even without UIBinder case, this is still how it  
suppose to work.


You need to think in term of consumption. If a composite has multiple  
focusable objects and wants to expose focus API, it has different options  
depending on the specific scenario.
In a SuggestBox case, it would use the input the field as the logical  
reference for Focus from outside point of view even though autocomplete  
popup might be focusable.


For another widget that has multiple inputs and it really wants to really  
provide a Focus API, it has two options. Either it needs to synthesize it  
in a way that it looks like a single focusable piece from outside or it  
will need implement additional APIs in addition to HasFocus.


Being said that, I don't ever remember trying to implement Focus interface  
on a UIBinder composed view. Focus concept is more intended to be used with  
widgets in contrast to a complex view.


--
To view, visit https://gwt-review.googlesource.com/2582
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I41e5c07e978d442db7d8402c57605cec1b3ea09e
Gerrit-PatchSet: 4
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: Goktug Gokdogan 
Gerrit-Reviewer: Jens Nehlmeier 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Matthew Dempsky 
Gerrit-Reviewer: Thomas Broyer 
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Introduces generic Composite widgets.

2013-05-21 Thread Brian Slesinsky

Brian Slesinsky has posted comments on this change.

Change subject: Introduces generic Composite widgets.
..


Patch Set 4:

Fair enough, it has to work with UiBinder. Though I suppose UiBinder could  
check for a delegate (or some such interface) as a special case.


What do we do when a composite has multiple focusable fields? It seems like  
the HasFocus interface implies a single field, but we would also want to  
support UiBinder for composite widgets that have multiple fields?


--
To view, visit https://gwt-review.googlesource.com/2582
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I41e5c07e978d442db7d8402c57605cec1b3ea09e
Gerrit-PatchSet: 4
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: Goktug Gokdogan 
Gerrit-Reviewer: Jens Nehlmeier 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Matthew Dempsky 
Gerrit-Reviewer: Thomas Broyer 
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [gwt-contrib] Do you guys need help in translation, Arabic language specifically?

2013-05-21 Thread John A. Tamplin
On Tue, May 14, 2013 at 2:13 AM, Mohammad Al-Quraian wrote:

> I want to try and help improve GWT, and I was wondering if that is
> possible. I noticed for instance in the Simple Pager, the words are still
> in English even when the selected locale is Arabic.
>

That particular example seems to be a case where no translations were ever
done at all.  We did get the Showcase messages professionally translated
(into Arabic and others), but it would certainly be helpful to have
translations for the Simple Pager widget built into GWT.

You would need to create
SimplePager_ImageButtonsConstants_.properties files in the same
directory, with lines like:

fastForward=
...

The file should be UTF8-encoded.

-- 
John A. Tamplin

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Introduces generic Composite widgets.

2013-05-21 Thread Jens Nehlmeier

Jens Nehlmeier has posted comments on this change.

Change subject: Introduces generic Composite widgets.
..


Patch Set 4:

I have once written a widget that does this  
foo.getDelegate().addXyzHandler() style but it comes with the cost that you  
can not use @UiHandler with it. If you are used to UiBinder its pretty  
annoying to not have @UiHandler support for a widget so at the end I  
actually added foo.addXyzHandler() methods to the widget and forward them  
to the delegate and obviously keep getDelegate() public so you are able to  
match against the event source.


It works ok'ish once everyone gets used to this style but API wise it just  
doesn't feel that great. First, the "problem" with making it  
UiBinder/UiHandler compatible is that developers just don't read the  
JavaDoc of the forwarding method foo.addXyzHandler() which states that they  
should use foo.getDelegate() when matching event sources. Thats because  
they don't call the method on their own when using UiHandler. Secondly,  
once you have these forwarding methods and a public getDelegate() you end  
up with two ways of adding handlers.


So I doubt that making Composite.getDelegate() public is a good choice. You  
end up with widgets that are similar to SuggestBox and DateBox that give  
access to their internals (which may result in deprecated methods in the  
future like SuggestBox.getTextBox()).


--
To view, visit https://gwt-review.googlesource.com/2582
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I41e5c07e978d442db7d8402c57605cec1b3ea09e
Gerrit-PatchSet: 4
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: Goktug Gokdogan 
Gerrit-Reviewer: Jens Nehlmeier 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Matthew Dempsky 
Gerrit-Reviewer: Thomas Broyer 
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Introduces generic Composite widgets.

2013-05-21 Thread Goktug Gokdogan

Goktug Gokdogan has posted comments on this change.

Change subject: Introduces generic Composite widgets.
..


Patch Set 4:

Composites are an encapsulation mechanism. For a widget, being a composite  
is an implementation detail that it doesn't necessarily want to expose  
outside. That is the reason in many case why they are going into all this  
trouble in the first place. ValueListBox and SuggestBox from SDK are good  
examples for that. What you are suggesting both breaks encapsulation and  
also other things like UiHandler or using Composite with widgets that are  
implemented using Composites.


If a composite want to expose its details, they can easily do that by  
providing an accessor to the internal widget and people can add handlers to  
that and the source would be the internal widget as expected.


--
To view, visit https://gwt-review.googlesource.com/2582
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I41e5c07e978d442db7d8402c57605cec1b3ea09e
Gerrit-PatchSet: 4
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: Goktug Gokdogan 
Gerrit-Reviewer: Jens Nehlmeier 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Matthew Dempsky 
Gerrit-Reviewer: Thomas Broyer 
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Introduces generic Composite widgets.

2013-05-21 Thread Brian Slesinsky

Brian Slesinsky has posted comments on this change.

Change subject: Introduces generic Composite widgets.
..


Patch Set 4:

We should decide how we're going to delegate events, since delegation is  
the whole point of this change.


On the one hand, when a handler receives a focus event, I would expect the  
event source to be the actual widget that received focus, and not a  
container for it. On the other hand, it's weird to add to add an event  
handler to one widget and have it actually be placed on a different widget.


It seems like in the calling code, it would be clearer to  be explicit and  
say foo.getDelegate().addFocusListener(...).
Or similarly, if you're calling a method that takes a HasFocusable, you  
should pass in foo.getDelegate().


This suggests we might not need FocusComposite at all, and instead the  
subclass should make getDelegate() public, possibly using a forwarding  
method with a more descriptive name. What was the original use case?


--
To view, visit https://gwt-review.googlesource.com/2582
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I41e5c07e978d442db7d8402c57605cec1b3ea09e
Gerrit-PatchSet: 4
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: Goktug Gokdogan 
Gerrit-Reviewer: Jens Nehlmeier 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Matthew Dempsky 
Gerrit-Reviewer: Thomas Broyer 
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Introduces generic Composite widgets.

2013-05-21 Thread Goktug Gokdogan

Goktug Gokdogan has posted comments on this change.

Change subject: Introduces generic Composite widgets.
..


Patch Set 3:

(1 comment)

Agreed. The patch is growing; I will take the FocusComposite and  
PanelComposite out but unfortunately that will cause the discussion history  
to be lost for future reference.



File user/src/com/google/gwt/user/client/ui/FocusComposite.java
Line 127: return getDelegate().addDoubleClickHandler(handler);
Actually, I was thinking of a simpler route but I still don't like the code  
bloat:


 public HandlerRegistration addDoubleClickHandler(DoubleClickHandler  
handler) {

   return getDelegate().addDoubleClickHandler(new DoubleClickHandler() {
 @Override
 public void onDoubleClick(DoubleClickEvent event) {
   Object oldSource = event.getSource();
   event.overrideSource(this);
   try {
 handler.onDoubleClickEvent(event);
   } finally {
 event.overrideSource(oldSource);
   }
 }
   });
 }

Are you sure, this will fire the events twice? I don't see a reason.
It looks like in the SuggestBox case,  the event is also delegated from the  
handler:

http://gwt-code-reviews.appspot.com/1785803/


--
To view, visit https://gwt-review.googlesource.com/2582
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I41e5c07e978d442db7d8402c57605cec1b3ea09e
Gerrit-PatchSet: 3
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: Goktug Gokdogan 
Gerrit-Reviewer: Jens Nehlmeier 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Matthew Dempsky 
Gerrit-Reviewer: Thomas Broyer 
Gerrit-HasComments: Yes

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Including the module name in the magic sourceURL comment in ...

2013-05-21 Thread Brian Slesinsky

Brian Slesinsky has posted comments on this change.

Change subject: Including the module name in the magic sourceURL comment in  
code generated by the iframe linker. This gives a bit more context in the  
browser debugger, and is especially important when including multiple GWT  
applications on a page, since otherwise they wi

..


Patch Set 3: Code-Review+1

Haven't tested, but I'm fine with this change in principle.

--
To view, visit https://gwt-review.googlesource.com/2630
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4044b777c29b058584efd756a7987244d9f7a158
Gerrit-PatchSet: 3
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Erik Kuefler 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: Daniel Kurka 
Gerrit-Reviewer: James Nelson 
Gerrit-Reviewer: Matthew Dempsky 
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Use JSON.parse() instead of eval() to deserialize rpc callba...

2013-05-21 Thread Brian Slesinsky

Brian Slesinsky has posted comments on this change.

Change subject: Use JSON.parse() instead of eval() to deserialize rpc  
callback payload

..


Patch Set 2:

Haven't looked at the code yet, but it seems like we should rev the  
protocol version number and modify the code to support both the old and new  
way. On the client, the version can be set differently for the IE 6/7  
permutation, and hopefully the version not in use can be optimized out. On  
the server it should support both.


But before we get into that, what's the motivation for this change? Most  
users of GWT-RPC don't care about the details about the wire format. What  
improvements do they get by changing it?


--
To view, visit https://gwt-review.googlesource.com/2900
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6062180397f5fabed1dd5f08140c2bd43a19fa9f
Gerrit-PatchSet: 2
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: John Ahlroos 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: Colin Alworth 
Gerrit-Reviewer: John Ahlroos 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Thomas Broyer 
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Chooses a default GWT source level to match the current java...

2013-05-21 Thread Matthew Dempsky

Matthew Dempsky has posted comments on this change.

Change subject: Chooses a default GWT source level to match the current  
java runtime.

..


Patch Set 3:

(1 comment)


File dev/core/src/com/google/gwt/dev/util/arg/SourceLevel.java
Line 68: if (javaSpecLevel >= sourceLevel.javaLevel &&  
javaSpecLevel > result.javaLevel) {
I think you mean "sourceLevel.javaLevel > result.javaLevel" for the second  
conditional?



--
To view, visit https://gwt-review.googlesource.com/2910
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I69dc0e9b1ac0ecf9a40ee2a08d8d555319d0af6f
Gerrit-PatchSet: 3
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Roberto Lublinerman 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Matthew Dempsky 
Gerrit-Reviewer: Roberto Lublinerman 
Gerrit-Reviewer: Thomas Broyer 
Gerrit-HasComments: Yes

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Chooses a default GWT source level to match the current java...

2013-05-21 Thread Roberto Lublinerman

Hello Leeroy Jenkins,

I'd like you to reexamine a change.  Please visit

https://gwt-review.googlesource.com/2910

to look at the new patch set (#3).

Change subject: Chooses a default GWT source level to match the current  
java runtime.

..

Chooses a default GWT source level to match the current java runtime.

Change-Id: I69dc0e9b1ac0ecf9a40ee2a08d8d555319d0af6f
---
M dev/core/src/com/google/gwt/dev/util/arg/OptionSource.java
M dev/core/src/com/google/gwt/dev/util/arg/SourceLevel.java
2 files changed, 25 insertions(+), 1 deletion(-)


--
To view, visit https://gwt-review.googlesource.com/2910
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I69dc0e9b1ac0ecf9a40ee2a08d8d555319d0af6f
Gerrit-PatchSet: 3
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Roberto Lublinerman 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Matthew Dempsky 
Gerrit-Reviewer: Roberto Lublinerman 
Gerrit-Reviewer: Thomas Broyer 

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Chooses a default gwt source level to match the current java...

2013-05-21 Thread Roberto Lublinerman

Roberto Lublinerman has posted comments on this change.

Change subject: Chooses a default gwt source level to match the current  
java runtime.

..


Patch Set 1:

(1 comment)


File dev/core/src/com/google/gwt/dev/util/arg/SourceLevel.java
Line 83:   double javaSpecLevel =  
Double.parseDouble(System.getProperty("java.specification.version"));
Hashmaps: yes, at fist I was not storing the java version value in the  
enum, will remove the hashmap :)


I was trying to make it future proof, i.e. if you are running under 1.8 gwt  
should choose 1.7 (the best match) and for that relying in the numerical  
ordering seemed appropriate. We could rely on the string ordering and avoid  
all parsing, although it is only done once.



--
To view, visit https://gwt-review.googlesource.com/2910
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I69dc0e9b1ac0ecf9a40ee2a08d8d555319d0af6f
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Roberto Lublinerman 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Matthew Dempsky 
Gerrit-Reviewer: Roberto Lublinerman 
Gerrit-Reviewer: Thomas Broyer 
Gerrit-HasComments: Yes

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Chooses a default gwt source level to match the current java...

2013-05-21 Thread Matthew Dempsky

Matthew Dempsky has posted comments on this change.

Change subject: Chooses a default gwt source level to match the current  
java runtime.

..


Patch Set 2:

The code should still compile the same as before with either JDK6 or JDK7,  
right?  If so, I'm okay with making that change to the GWT 2.5.1 reference  
jar.  People shouldn't really be using that jar for anything else anyway.


--
To view, visit https://gwt-review.googlesource.com/2910
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I69dc0e9b1ac0ecf9a40ee2a08d8d555319d0af6f
Gerrit-PatchSet: 2
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Roberto Lublinerman 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Matthew Dempsky 
Gerrit-Reviewer: Roberto Lublinerman 
Gerrit-Reviewer: Thomas Broyer 
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Chooses a default gwt source level to match the current java...

2013-05-21 Thread Roberto Lublinerman

Roberto Lublinerman has posted comments on this change.

Change subject: Chooses a default gwt source level to match the current  
java runtime.

..


Patch Set 2:

I just noticed that the ApiChecker fails if you are running with source  
compatibility 7 due to the fact that Enum.java in emul does not compile in  
java 7.


I was thinking of updating the old source jar gwt25userApi. It is a minor  
update (adds a cast) that does not affect the api in any way:


   public final int compareTo(E other) {
 // TODO: will a bridge method do the cast for us?
 // if (this.getDeclaringClass() != other.getDeclaringClass()) {
 // throw new ClassCastException();
 // }
-return this.ordinal - other.ordinal;
+return this.ordinal - ((Enum) other).ordinal;
   }

Any thoughts about it?

--
To view, visit https://gwt-review.googlesource.com/2910
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I69dc0e9b1ac0ecf9a40ee2a08d8d555319d0af6f
Gerrit-PatchSet: 2
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Roberto Lublinerman 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Matthew Dempsky 
Gerrit-Reviewer: Roberto Lublinerman 
Gerrit-Reviewer: Thomas Broyer 
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Chooses a default gwt source level to match the current java...

2013-05-21 Thread Matthew Dempsky

Matthew Dempsky has posted comments on this change.

Change subject: Chooses a default gwt source level to match the current  
java runtime.

..


Patch Set 1:

(1 comment)


File dev/core/src/com/google/gwt/dev/util/arg/SourceLevel.java
Line 83:   double javaSpecLevel =  
Double.parseDouble(System.getProperty("java.specification.version"));
It looks like java.specification.version will give values like "1.6"  
and "1.7", so couldn't you just do a direct string equality comparison  
against stringValue instead of needing the Double parsing?


Also, I'd probably just iterate through SourceLevel.values() and try to  
match each one.  There's not that many SourceLevels currently, so no need  
to get fancy with hash maps to optimize it. :)



--
To view, visit https://gwt-review.googlesource.com/2910
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I69dc0e9b1ac0ecf9a40ee2a08d8d555319d0af6f
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Roberto Lublinerman 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Matthew Dempsky 
Gerrit-HasComments: Yes

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Chooses a default gwt source level to match the current java...

2013-05-21 Thread Roberto Lublinerman

Hello Leeroy Jenkins,

I'd like you to reexamine a change.  Please visit

https://gwt-review.googlesource.com/2910

to look at the new patch set (#2).

Change subject: Chooses a default gwt source level to match the current  
java runtime.

..

Chooses a default gwt source level to match the current java runtime.

Change-Id: I69dc0e9b1ac0ecf9a40ee2a08d8d555319d0af6f
---
M dev/core/src/com/google/gwt/dev/util/arg/OptionSource.java
M dev/core/src/com/google/gwt/dev/util/arg/SourceLevel.java
2 files changed, 42 insertions(+), 1 deletion(-)


--
To view, visit https://gwt-review.googlesource.com/2910
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I69dc0e9b1ac0ecf9a40ee2a08d8d555319d0af6f
Gerrit-PatchSet: 2
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Roberto Lublinerman 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Matthew Dempsky 

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Lint errors

2013-05-21 Thread Roberto Lublinerman

Roberto Lublinerman has abandoned this change.

Change subject: Lint errors
..


Abandoned

Pushed in error.

--
To view, visit https://gwt-review.googlesource.com/2881
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: I62cc493c7324d42bf6fa36085007cbd59e87933a
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Roberto Lublinerman 

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Lint errors

2013-05-21 Thread Roberto Lublinerman

Roberto Lublinerman has uploaded a new change for review.

  https://gwt-review.googlesource.com/2881


Change subject: Lint errors
..

Lint errors

Change-Id: I62cc493c7324d42bf6fa36085007cbd59e87933a
---
M dev/core/src/com/google/gwt/dev/util/arg/SourceLevel.java
1 file changed, 2 insertions(+), 2 deletions(-)



diff --git a/dev/core/src/com/google/gwt/dev/util/arg/SourceLevel.java  
b/dev/core/src/com/google/gwt/dev/util/arg/SourceLevel.java

index 230f5a60..73eaf9d 100644
--- a/dev/core/src/com/google/gwt/dev/util/arg/SourceLevel.java
+++ b/dev/core/src/com/google/gwt/dev/util/arg/SourceLevel.java
@@ -81,8 +81,8 @@
 SourceLevel result = SourceLevel.JAVA6;
 try {
   double javaSpecLevel =  
Double.parseDouble(System.getProperty("java.specification.version"));

-  for (double javaLevel :  gwtLevelByJavaLevel.keySet() ) {
-if (javaSpecLevel >= javaLevel && javaSpecLevel >result.javaLevel)  
{

+  for (double javaLevel : gwtLevelByJavaLevel.keySet()) {
+if (javaSpecLevel >= javaLevel && javaSpecLevel >  
result.javaLevel) {

   result = gwtLevelByJavaLevel.get(javaLevel);
 }
   }

--
To view, visit https://gwt-review.googlesource.com/2881
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I62cc493c7324d42bf6fa36085007cbd59e87933a
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Roberto Lublinerman 

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Chooses a default gwt source level to match the current java...

2013-05-21 Thread Roberto Lublinerman

Roberto Lublinerman has uploaded a new change for review.

  https://gwt-review.googlesource.com/2910


Change subject: Chooses a default gwt source level to match the current  
java runtime.

..

Chooses a default gwt source level to match the current java runtime.

Change-Id: I69dc0e9b1ac0ecf9a40ee2a08d8d555319d0af6f
---
M dev/core/src/com/google/gwt/dev/util/arg/OptionSource.java
M dev/core/src/com/google/gwt/dev/util/arg/SourceLevel.java
2 files changed, 42 insertions(+), 1 deletion(-)



diff --git a/dev/core/src/com/google/gwt/dev/util/arg/OptionSource.java  
b/dev/core/src/com/google/gwt/dev/util/arg/OptionSource.java

index 15f238f..da05070 100644
--- a/dev/core/src/com/google/gwt/dev/util/arg/OptionSource.java
+++ b/dev/core/src/com/google/gwt/dev/util/arg/OptionSource.java
@@ -20,7 +20,10 @@
  */
 public interface OptionSource {

-  static final SourceLevel DEFAULT_SOURCE_LEVEL = SourceLevel.JAVA6;
+  /**
+   * The default GWT source level is the one that matches best that of the  
runtime environment.

+   */
+  static final SourceLevel DEFAULT_SOURCE_LEVEL =  
SourceLevel.getDefaultSourceLevel();


   SourceLevel getSourceLevel();

diff --git a/dev/core/src/com/google/gwt/dev/util/arg/SourceLevel.java  
b/dev/core/src/com/google/gwt/dev/util/arg/SourceLevel.java

index 63c2fc2..230f5a60 100644
--- a/dev/core/src/com/google/gwt/dev/util/arg/SourceLevel.java
+++ b/dev/core/src/com/google/gwt/dev/util/arg/SourceLevel.java
@@ -15,6 +15,10 @@
  */
 package com.google.gwt.dev.util.arg;

+import com.google.gwt.thirdparty.guava.common.collect.ImmutableMap;
+
+import java.util.Map;
+
 /**
  * Java source level compatibility constants.
  * Java versions range from 1.0 to 1.7.
@@ -28,10 +32,12 @@

   private final String stringValue;
   private final String altStringValue;
+  private final Double javaLevel;

   SourceLevel(String stringValue, String altStringValue) {
 this.stringValue = stringValue;
 this.altStringValue = altStringValue;
+this.javaLevel = Double.parseDouble(stringValue);
   }

   /**
@@ -52,4 +58,36 @@
   public String toString() {
 return stringValue;
   }
+
+  /**
+   * Maps from Java source compatibility level to the GWT compiler Java  
source compatibility levels.

+   */
+  private static final Map gwtLevelByJavaLevel;
+
+  static {
+ImmutableMap.Builder builder =  
ImmutableMap.builder();

+for (SourceLevel sourceLevel : SourceLevel.values()) {
+  builder.put(sourceLevel.javaLevel, sourceLevel);
+}
+gwtLevelByJavaLevel = builder.build();
+  }
+
+  /**
+   * Provides a SourceLevel that best matches the runtime environment (to  
be used as a default).

+   *
+   * @return a SourceLevel that best matches the Java source level of the  
runtime environment.

+   */
+  static SourceLevel getDefaultSourceLevel() {
+SourceLevel result = SourceLevel.JAVA6;
+try {
+  double javaSpecLevel =  
Double.parseDouble(System.getProperty("java.specification.version"));

+  for (double javaLevel :  gwtLevelByJavaLevel.keySet() ) {
+if (javaSpecLevel >= javaLevel && javaSpecLevel >result.javaLevel)  
{

+  result = gwtLevelByJavaLevel.get(javaLevel);
+}
+  }
+} catch (NumberFormatException e) {
+}
+return result;
+  }
 }

--
To view, visit https://gwt-review.googlesource.com/2910
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I69dc0e9b1ac0ecf9a40ee2a08d8d555319d0af6f
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Roberto Lublinerman 

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [gwt-contrib] Integration Testing Idea

2013-05-21 Thread Jens


> That actually sounds promising. This may be a dumb question but can anyone 
> think of a way to slave the WebDriver and JUNIT together?


Take a look at: 
http://nadimsaker.blogspot.de/2011/10/how-to-run-selenium-webdriver-code-with.html

Before setting up WebDriver in the setUp() method you should be able add 
code to install a database fixture for testing. 

-- J.

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [gwt-contrib] Moving mailing lists to @gwtproject.org?

2013-05-21 Thread Stephen Haberman

> It is slightly redundant, but I think it's nice to keep the option open to
> create other foo-discuss or bar-contrib mailing lists if the project grows and
> splits into independent subprojects.

True; I like being optimistic about future growth. :-)

> But I'd also like to avoid the name "gwt-users" just because that's
> also the name of Google's internal GWT users mailing list, and using
> the same name just makes it more likely that a Googler accidentally
> confuses the two.

Hehe. Selfishly, I'd love to see more conversations from that internal
list happen here.

Obviously I understand that, with an internal list, you can reference
internal paths/code snippets/secret projects/etc. that you otherwise
would not want non-Googlers knowing about.

But for the more generic stuff (which would be some/most of it?),
having more knowledge sharing happen publicly would be awesome.

- Stephen

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [gwt-contrib] Integration Testing Idea

2013-05-21 Thread darkling235
That actually sounds promising. This may be a dumb question but can anyone 
think of a way to slave the WebDriver and JUNIT together? All I really need 
is to run a JDBC query or a RPC command before each test runs. As long as I 
can get the DB into a known state before running each test all my problems 
go away. I'm willing to try and code the feature (not sure if anyone else 
would ever want it) but I wanted to make sure there wasn't a simpler 
approach I'd over looked. The main reason that I have trouble with using 
WebDriver is that we have heavy usage of TreeGrids and Grids to maintain 
state. I haven't been able to use WebDriver to read data from these objects 
very well because a lot of the state is buried in HTML that may not be 
visible at any time and would have complex XPaths to locate.

Thanks for all the great feedback.

On Monday, May 20, 2013 10:28:34 PM UTC-4, Brian Slesinsky wrote:
>
> I've written a library (not open source) for integration testing but it 
> proved not so popular with my users. There were similar issues: 
> initializing the database is tricky from the browser (it requires a whole 
> different RPC API just for testing), and writing tests of asynchronous code 
> is hard when the tests are async code as well.
>
> With WebDriver, you don't have that problem since the Java code running in 
> a JVM can do a synchronous wait, and you can use JDBC directly. Of course 
> you get other WebDriver-specific problems that are as yet unsolved, like 
> knowing when the app is no longer busy without relying on flaky timeouts.
>
> One possibility is to expose a JavaScript API in your GWT app and call it 
> from WebDriver. There's room for innovation here.
>
>
>
> On Mon, May 20, 2013 at 4:43 PM, > wrote:
>
>> First off I love using GWT but I have a concern about the current unit 
>> testing available. The JUNIT tests provide a great way to do regression 
>> testing but I find myself lacking an effective way to do integration 
>> testing. I really need a way to make sure that all the layers match up and 
>> work together properly. The way I usually do that on other platforms is 
>> blow away the database before each test, create a standard configuration in 
>> the database, and then perform whatever CRUDs and other operations I want 
>> to test.
>>
>> The issue I have with the GWT unit tests is that since I can't run an 
>> Async request in the beforeMethod I don't have a way of setting up the data 
>> on the back end before I run my test. This means that if the GUI tells me 
>> there are 3 objects in the database right now, I don't really know if 
>> that's correct or not. I think that to run effective integration tests you 
>> need a stable known state in the DB.
>>
>> I've tried managing this in several ways. I attempted to run a long 
>> series of tests in a suite where the first test emptied the database and 
>> created my stable configuration, then subsequent tests would perform CRUDs. 
>> The problem with this was that each test had to be aware of the state all 
>> the proceeding tests had left the DB in. They were very complex and 
>> expensive to maintain and were ultimately abandoned. 
>>
>> I was wondering if anyone had a better solution for how to do this.
>>
>> I was considering trying to add a sister class to GWTTestSuite that would 
>> give  the ability to run a synchronous method on the server during the 
>> beforeMethod and would allow proper setup for subsequent integration 
>> testing.
>>
>> I was hoping someone could tell me how complex this would be and if there 
>> was a reason why GWT did not include this feature. I understand that unit 
>> tests can be run in either native java or javascript but I believe I can 
>> still use java to make an HTTPRequest to the server with expected 
>> parameters. I think having the ability to do proper setup on the backend 
>> before running a test suite would be very valuable. Can anyone give me some 
>> feedback on this idea?
>>
>> Thanks
>>
>> -- 
>> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "GWT Contributors" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to 
>> google-web-toolkit-contributors+unsubscr...@googlegroups.com
>> .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: working on issue 8063, ie10 permutation and ms pointer events

2013-05-21 Thread Manuel Carrasco Moñino

Manuel Carrasco Moñino has posted comments on this change.

Change subject: working on issue 8063, ie10 permutation and ms pointer  
events

..


Patch Set 2: Code-Review+1

(4 comments)


File user/src/com/google/gwt/dom/DOM.gwt.xml
Line 37:
Use two spaces here



File user/src/com/google/gwt/event/dom/client/MsPointerCancelEvent.java
Line 9:  *
There are final spaces here, and in many other lines of other classes in  
the patch.




File user/src/com/google/gwt/http/HTTP.gwt.xml
Line 30:
This block shouldn't be necessary. Is there any reason to add this?



File user/src/com/google/gwt/user/DOM.gwt.xml
Line 35:   class="com.google.gwt.user.client.impl.DOMImpl"/>

It should be indented with two spaces


--
To view, visit https://gwt-review.googlesource.com/2421
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iba0cec6e33ffd3fefa69c3c760868beb00d42076
Gerrit-PatchSet: 2
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Matti Tahvonen 
Gerrit-Reviewer: Manuel Carrasco Moñino 
Gerrit-Reviewer: Thomas Broyer 
Gerrit-HasComments: Yes

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Use JSON.parse() instead of eval() to deserialize rpc callba...

2013-05-21 Thread Thomas Broyer

Thomas Broyer has posted comments on this change.

Change subject: Use JSON.parse() instead of eval() to deserialize rpc  
callback payload

..


Patch Set 2:

(1 comment)

As Colin said, this change is not backwards-compatible when transmitting  
large payloads (which will use array .concat()). Could this be handled  
dynamically? (look for ").concat(" in the payload and use eval() in this  
case –could lead to some false positives but that should be rare enough,  
and relatively harmless–, otherwise use JSON.parse if available or eval()  
otherwise). As a side note, JsonUtils.safeEval has some overhead in the  
non-JSON.parse case compared to the bare eval() done in  
ClientSerializationStreamReader, and even JsonUtils.unsafeEval has a small  
overhead.


I also wonder if changing the serialization of Infinity and NaN isn't  
enough to necessitate a bump of protocol version.


If it were just me, I'd drop IE6/7 support as soon as the next version (and  
IE8 by fall next year, or no later than in 2 years from now), then we could  
simply remove the .concat() workaround and switch everyone to JSON.parse  
(and bumping the protocol version to 8). I'd be happy to discuss that again  
on gwt-steering.



File  
user/super/com/google/gwt/user/translatable/com/google/gwt/user/client/rpc/impl/ClientSerializationStreamReader.java
Line 83: return new  
Number(th...@com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader::results[--th...@com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader::index]);
Not 'new Number(x)' (which will return a Number *object*), rather  
just 'Number(x)' (which will return a Number *value*)



--
To view, visit https://gwt-review.googlesource.com/2900
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6062180397f5fabed1dd5f08140c2bd43a19fa9f
Gerrit-PatchSet: 2
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: John Ahlroos 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: Colin Alworth 
Gerrit-Reviewer: John Ahlroos 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Thomas Broyer 
Gerrit-HasComments: Yes

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Use JSON.parse() instead of eval() to deserialize rpc callba...

2013-05-21 Thread John Ahlroos

John Ahlroos has posted comments on this change.

Change subject: Use JSON.parse() instead of eval() to deserialize rpc  
callback payload

..


Patch Set 2:

Removed the protocol version for now since it will cause a lot of work to  
change.


Instead, changed the commit so the only real change is that NaN and  
Infinity is sent as strings instead as a numbers making the JSON valid. On  
the client side then JSON.parse can be used to parse the JSON and finally  
when reading the double values Number(x) is used to make sure the doubles  
(and floats) are numbers. This should be backward compatible with IE6/7 as  
well as JSONUtil.safeEval() will fall back to eval() in that case.


--
To view, visit https://gwt-review.googlesource.com/2900
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6062180397f5fabed1dd5f08140c2bd43a19fa9f
Gerrit-PatchSet: 2
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: John Ahlroos 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: Colin Alworth 
Gerrit-Reviewer: John Ahlroos 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Thomas Broyer 
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Use JSON.parse() instead of eval() to deserialize rpc callba...

2013-05-21 Thread John Ahlroos

Hello Leeroy Jenkins, Thomas Broyer,

I'd like you to reexamine a change.  Please visit

https://gwt-review.googlesource.com/2900

to look at the new patch set (#2).

Change subject: Use JSON.parse() instead of eval() to deserialize rpc  
callback payload

..

Use JSON.parse() instead of eval() to deserialize rpc callback payload

Changes deserialization of the RPC callback payload to use JSON.parse()
instead of eval() to avoid memory leaks in IE9. Handles special
cases (Infinity, -Infinity and NaN) by converting them into strings
before they are sent to the client. ClientSerializationStreamReader.
readDouble() will then use Number(x) to convert the string back to
a number representation.

Change-Id: I6062180397f5fabed1dd5f08140c2bd43a19fa9f
---
M  
user/src/com/google/gwt/user/client/rpc/impl/AbstractSerializationStreamWriter.java
M  
user/super/com/google/gwt/user/translatable/com/google/gwt/user/client/rpc/impl/ClientSerializationStreamReader.java

2 files changed, 9 insertions(+), 8 deletions(-)


--
To view, visit https://gwt-review.googlesource.com/2900
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6062180397f5fabed1dd5f08140c2bd43a19fa9f
Gerrit-PatchSet: 2
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: John Ahlroos 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: Colin Alworth 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Thomas Broyer 

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Use JSON.parse() instead of eval() to deserialize rpc callba...

2013-05-21 Thread John Ahlroos

John Ahlroos has posted comments on this change.

Change subject: Use JSON.parse() instead of eval() to deserialize rpc  
callback payload

..


Patch Set 1:

(2 comments)


File  
user/src/com/google/gwt/user/client/rpc/impl/AbstractSerializationStreamWriter.java

Line 97:   append("0");
Yes 1e1000 should work for Infinity but the NaN case won't. Actually I  
think changing it to strings is a better idea since it also more readable.




File  
user/super/com/google/gwt/user/translatable/com/google/gwt/user/client/rpc/impl/ClientSerializationStreamReader.java

Line 37:   private static native JavaScriptObject parse(String encoded) /*-{
Yes, didn't know about that. Should definitely use it instead.


--
To view, visit https://gwt-review.googlesource.com/2900
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6062180397f5fabed1dd5f08140c2bd43a19fa9f
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: John Ahlroos 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: Colin Alworth 
Gerrit-Reviewer: John Ahlroos 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Thomas Broyer 
Gerrit-HasComments: Yes

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Use JSON.parse() instead of eval() to deserialize rpc callba...

2013-05-21 Thread Colin Alworth

Colin Alworth has posted comments on this change.

Change subject: Use JSON.parse() instead of eval() to deserialize rpc  
callback payload

..


Patch Set 1:

(1 comment)

The ServerSerializationStreamWriter will also need modifications, two that  
I can think of:
 * writeLong currently is using " instead of ', which isn't valid in JSON.  
This should be failing in the unit tests, as long as testing something that  
uses parse instead of eval.
 * very large payloads will now break when the array concatenating code  
kicks in, writing ].concat([ to join arrays that are otherwise too big for  
ie6/7 (and 8?). This isn't valid JSON, so this will break when the object  
graph reaches a certain size.


Can you make sure to run the unit tests remotely in each IE version to  
verify that you changes will behave? I believe there is a test for each  
direction of each primitive, but not a test for very large data sets.



File  
user/src/com/google/gwt/user/client/rpc/impl/AbstractSerializationStreamWriter.java

Line 97:   append("0");
Infinity does actually work round trip in my quick testing in this way, as  
1e1000 or the like is a) legal json and b) outside the range of double, so  
will end up as +Infinity on the JS side after parsing, or when wrapped up  
in Double.parseDouble. However, 0 being used as NaN won't fly, you're  
right. One idea is to emit null, then read out the null as a special case -  
in my testing this behaved well in all browsers.


Sending the strings "+Infinity", "NaN" could also work, but then you need  
parse those as strings, not as numbers after reading it as json, i think in  
my first try at this I decided that was more trouble than it was worth.


No need to use >= or <= for infinity checks, == should be sufficient.

writeFloat will also need similar treatment.


--
To view, visit https://gwt-review.googlesource.com/2900
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6062180397f5fabed1dd5f08140c2bd43a19fa9f
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: John Ahlroos 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: Colin Alworth 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Thomas Broyer 
Gerrit-HasComments: Yes

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Use JSON.parse() instead of eval() to deserialize rpc callba...

2013-05-21 Thread Thomas Broyer

Thomas Broyer has posted comments on this change.

Change subject: Use JSON.parse() instead of eval() to deserialize rpc  
callback payload

..


Patch Set 1:

Brian, I added you as a reviewer as you're the author of the RPC protocol  
documentation:  
https://docs.google.com/document/d/1eG0YocsYYbNAtivkLtcaiEE5IOF5u4LUol8-LL0TIKU/edit


--
To view, visit https://gwt-review.googlesource.com/2900
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6062180397f5fabed1dd5f08140c2bd43a19fa9f
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: John Ahlroos 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: Colin Alworth 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Thomas Broyer 
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Use JSON.parse() instead of eval() to deserialize rpc callba...

2013-05-21 Thread Thomas Broyer

Thomas Broyer has posted comments on this change.

Change subject: Use JSON.parse() instead of eval() to deserialize rpc  
callback payload

..


Patch Set 1: Code-Review-2

(2 comments)

AFAICT, this change is kind of useless without some "negotiation" of the  
protocol version on the server-side (writing with the same protocol version  
as the request used), and deferred-binding on the client-side to use  
protocol version 7 on IE6-7 (where JSON.parse is not available; I think we  
can safely assume all other browsers have JSON.parse:  
http://caniuse.com/json).


This requires a huge refactoring of the server code though.

This change, as is (except entirely removing the eval() codepath), will be  
OK in a year from now though, when we'll definitely remove support for  
IE6-7 (I though we talked about the end of this year on the SC meeting,  
which would rather be GWT 2.6, but IIUC Ray & Daniel's I/O talk they said  
GWT 3.0)



File  
user/src/com/google/gwt/user/client/rpc/impl/AbstractSerializationStreamWriter.java

Line 97:   append("0");
That means that infinity and NaN don't roundtrip, which is a breaking  
change.


Couldn't we emit "+Infinity", "-Infinity" and "NaN" as strings and modify  
ClientSerializationStreamReader to use Number(x) for parsing (will accept  
either one of number or string, and act accordingly, parsing "+Infinity"  
and "-Infinity" as positive and negative infinity, and failing to  
parse "NaN" as a number thus returning NaN; ServerSerializationStreamReader  
already does the right thing as it uses Double.parseDouble).


ClientSerializationStreamReader in DevMode could (should?) also use JSON  
parsing then.




File  
user/super/com/google/gwt/user/translatable/com/google/gwt/user/client/rpc/impl/ClientSerializationStreamReader.java

Line 37:   private static native JavaScriptObject parse(String encoded) /*-{
We have JsonUtils.safeEval() already.


--
To view, visit https://gwt-review.googlesource.com/2900
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6062180397f5fabed1dd5f08140c2bd43a19fa9f
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: John Ahlroos 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: Colin Alworth 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Thomas Broyer 
Gerrit-HasComments: Yes

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Use JSON.parse() instead of eval() to deserialize rpc callba...

2013-05-21 Thread John Ahlroos

John Ahlroos has uploaded a new change for review.

  https://gwt-review.googlesource.com/2900


Change subject: Use JSON.parse() instead of eval() to deserialize rpc  
callback payload

..

Use JSON.parse() instead of eval() to deserialize rpc callback payload

Changes deserialization of the RPC callback payload to use JSON.parse()
instead of eval() to avoid memory leaks in IE9. Handles special
cases (Infinity, -Infinity and NaN) by converting them into valid
JSON values before serialization.

Changes the RPC protocol version to 8 where protocol version <8 will
still be parsed with eval().

Change-Id: I6062180397f5fabed1dd5f08140c2bd43a19fa9f
---
M  
user/src/com/google/gwt/user/client/rpc/impl/AbstractSerializationStream.java
M  
user/src/com/google/gwt/user/client/rpc/impl/AbstractSerializationStreamWriter.java
M  
user/super/com/google/gwt/user/translatable/com/google/gwt/user/client/rpc/impl/ClientSerializationStreamReader.java

3 files changed, 18 insertions(+), 4 deletions(-)



diff --git  
a/user/src/com/google/gwt/user/client/rpc/impl/AbstractSerializationStream.java  
b/user/src/com/google/gwt/user/client/rpc/impl/AbstractSerializationStream.java

index 9a8d093..07fa1be 100644
---  
a/user/src/com/google/gwt/user/client/rpc/impl/AbstractSerializationStream.java
+++  
b/user/src/com/google/gwt/user/client/rpc/impl/AbstractSerializationStream.java

@@ -43,7 +43,7 @@
* The current RPC protocol version. This version differs from the  
previous

* one in that it supports {@links RpcToken}s.
*/
-  public static final int SERIALIZATION_STREAM_VERSION = 7;
+  public static final int SERIALIZATION_STREAM_VERSION = 8;

   /**
* The oldest supported RPC protocol version.
diff --git  
a/user/src/com/google/gwt/user/client/rpc/impl/AbstractSerializationStreamWriter.java  
b/user/src/com/google/gwt/user/client/rpc/impl/AbstractSerializationStreamWriter.java

index db74b38..a394d78 100644
---  
a/user/src/com/google/gwt/user/client/rpc/impl/AbstractSerializationStreamWriter.java
+++  
b/user/src/com/google/gwt/user/client/rpc/impl/AbstractSerializationStreamWriter.java

@@ -89,7 +89,15 @@
   }

   public void writeDouble(double fieldValue) {
-append(String.valueOf(fieldValue));
+if (fieldValue >= Double.POSITIVE_INFINITY) {
+  append("1e1000");
+} else if (fieldValue <= Double.NEGATIVE_INFINITY) {
+  append("-1e1000");
+} else if (Double.isNaN(fieldValue)) {
+  append("0");
+} else {
+  append(String.valueOf(fieldValue));
+}
   }

   public void writeFloat(float fieldValue) {
diff --git  
a/user/super/com/google/gwt/user/translatable/com/google/gwt/user/client/rpc/impl/ClientSerializationStreamReader.java  
b/user/super/com/google/gwt/user/translatable/com/google/gwt/user/client/rpc/impl/ClientSerializationStreamReader.java

index f85f42e..f70da39 100644
---  
a/user/super/com/google/gwt/user/translatable/com/google/gwt/user/client/rpc/impl/ClientSerializationStreamReader.java
+++  
b/user/super/com/google/gwt/user/translatable/com/google/gwt/user/client/rpc/impl/ClientSerializationStreamReader.java

@@ -33,6 +33,10 @@
   private static native JavaScriptObject eval(String encoded) /*-{
 return eval(encoded);
   }-*/;
+
+  private static native JavaScriptObject parse(String encoded) /*-{
+return JSON.parse(encoded);
+  }-*/;

   private static native int getLength(JavaScriptObject array) /*-{
 return array.length;
@@ -51,8 +55,10 @@
   }

   @Override
-  public void prepareToRead(String encoded) throws SerializationException {
-results = eval(encoded);
+  public void prepareToRead(String encoded) throws SerializationException {
+String versionStr = encoded.substring(encoded.lastIndexOf(",")+1,  
encoded.lastIndexOf("]"));

+int version = Integer.parseInt(versionStr);
+results = version < 8 ? eval(encoded) : parse(encoded);
 index = getLength(results);
 super.prepareToRead(encoded);


--
To view, visit https://gwt-review.googlesource.com/2900
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6062180397f5fabed1dd5f08140c2bd43a19fa9f
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: John Ahlroos 

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: fixed a typo in StringBuilder

2013-05-21 Thread Daniel Kurka

Daniel Kurka has submitted this change and it was merged.

Change subject: fixed a typo in StringBuilder
..


fixed a typo in StringBuilder

Change-Id: I640d45e056d90794648a73f7d5546c520d4a41df
---
M user/super/com/google/gwt/emul/java/lang/StringBuilder.java
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Matthew Dempsky: Looks good to me, but someone else must approve
  Leeroy Jenkins: Verified
  Thomas Broyer: Looks good to me, approved



diff --git a/user/super/com/google/gwt/emul/java/lang/StringBuilder.java  
b/user/super/com/google/gwt/emul/java/lang/StringBuilder.java

index 37eb242..eb87a52 100644
--- a/user/super/com/google/gwt/emul/java/lang/StringBuilder.java
+++ b/user/super/com/google/gwt/emul/java/lang/StringBuilder.java
@@ -231,7 +231,7 @@
 return this;
   }

-  public StringBuilder reserve() {
+  public StringBuilder reverse() {
 impl.reverse(data);
 return this;
   }

--
To view, visit https://gwt-review.googlesource.com/2861
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I640d45e056d90794648a73f7d5546c520d4a41df
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Daniel Kurka 
Gerrit-Reviewer: Daniel Kurka 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Matthew Dempsky 
Gerrit-Reviewer: Thomas Broyer 

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Introduces generic Composite widgets.

2013-05-21 Thread Thomas Broyer

Thomas Broyer has posted comments on this change.

Change subject: Introduces generic Composite widgets.
..


Patch Set 3:

(1 comment)

I'd vote for removing FocusComposite from this change, to get it merged  
early, and adding it in its own change.



File user/src/com/google/gwt/user/client/ui/FocusComposite.java
Line 127: return getDelegate().addDoubleClickHandler(handler);
Yes, that'd mean tracking, for each event, whether the handler was added to  
the delegate widget, something like:


   private boolean dblClickHandlerRegistered;
   …
   public HandlerRegistration addDoubleClickHandler(DoubleClickHandler  
handler) {

 if (!dblClickHandlerRegistered) {
   getDelegate().addDoubleClickHandler(new DoubleClickHandler() {
 @Override
 public void onDoubleClick(DoubleClickEvent event) {
   fireEvent(event);
 }
   });
   dbleClickHandlerRegistered = true;
 }
 return addHandler(handler, DoubleClickEvent.getType());
   }

That's a lot of boilerplate and a bit of runtime overhead; and it doesn't  
remove the anonymous handler from the delegate when all the handlers are  
removed from the composite; this would require tracking the number of  
handlers added –unfortunately I don't think we can use getHandlerCount here  
as it doesn't account for queued adds/removes, when adding/removing  
handlers from within an event handler–, storing the HandlerRegistration for  
the anonymous handler, and wrapping the HandlerRegistration returned from  
addHandler() to remove the anonymous handler when the handler count reaches  
0.


Note that instead of an anonymous class, we could have an inner class  
implementing all the event handlers; similar to SuggestBox. I have no idea  
what the compiler would optimize best.


Last, but not least, it'll possibly fire the events twice when  
getWidget()==getDelegate(); see issue 3533.



--
To view, visit https://gwt-review.googlesource.com/2582
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I41e5c07e978d442db7d8402c57605cec1b3ea09e
Gerrit-PatchSet: 3
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan 
Gerrit-Reviewer: Brian Slesinsky 
Gerrit-Reviewer: Goktug Gokdogan 
Gerrit-Reviewer: Jens Nehlmeier 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Matthew Dempsky 
Gerrit-Reviewer: Thomas Broyer 
Gerrit-HasComments: Yes

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: fixed a typo in StringBuilder

2013-05-21 Thread Thomas Broyer

Thomas Broyer has posted comments on this change.

Change subject: fixed a typo in StringBuilder
..


Patch Set 1: Code-Review+2

(1 comment)


Commit Message
Line 7: fixed a typo in StringBuilder
Add xref to issue 8117?


--
To view, visit https://gwt-review.googlesource.com/2861
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I640d45e056d90794648a73f7d5546c520d4a41df
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Daniel Kurka 
Gerrit-Reviewer: Leeroy Jenkins 
Gerrit-Reviewer: Matthew Dempsky 
Gerrit-Reviewer: Thomas Broyer 
Gerrit-HasComments: Yes

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: fixed a typo in StringBuilder

2013-05-21 Thread Matthew Dempsky

Matthew Dempsky has posted comments on this change.

Change subject: fixed a typo in StringBuilder
..


Patch Set 1: Code-Review+1

Hah, LGTM

But please make the commit message more descriptive like: "Fix typo in  
method name: s/reserve/reverse/"


--
To view, visit https://gwt-review.googlesource.com/2861
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I640d45e056d90794648a73f7d5546c520d4a41df
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Daniel Kurka 
Gerrit-Reviewer: Matthew Dempsky 
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.