Goktug Gokdogan has posted comments on this change.

Change subject: Introduces generic Composite widgets.
......................................................................


Patch Set 1:

(6 comments)

Just to be clear, I'm not oppose to add generics to Composite itself. I'm just concerned about simple case where people don't need any generics (which is much more common).
I would like to hear what other people think about alternatives.

....................................................
File user/src/com/google/gwt/user/client/ui/PanelComposite.java
Line 39:     this.add(asWidgetOrNull(w));
I'm not sure what are we trying to solve with this alternative?


....................................................
File user/src/com/google/gwt/user/client/ui/ResizeComposite.java
Line 23:  * If you want initWidget/getWidget to be type safe please use
Actually, this class exist for the same reason non-generic Composite exists.
I didn't extend TypeComposite to keep it backward compatible but we can change that.


....................................................
File user/src/com/google/gwt/user/client/ui/TypedComposite.java
Line 34:  * {@example com.google.gwt.examples.CompositeExample}
Will take a look after we decide how to move forward.


Line 118:     if (widget == null) {
Any of the public APIs of the widget can be called from outside without the widget attached to the dom. When that happens, if initwidget is not called yet, they will end up with NPE. Although I used getCheckedWidget in new ones, Composite class itself is still prone to this issue as it is not using getCheckedWidget itself:
https://code.google.com/p/google-web-toolkit/issues/detail?id=6997

I can send another CL to fix that?


Line 118:     if (widget == null) {
Actually I'm totally lost in Renderable part. Wouldn't it also fail with with NPE when initializeClaimedElement called? Isn't that a better place to put the check?


....................................................
File user/src/com/google/gwt/user/client/ui/TypedResizeComposite.java
Line 25: public abstract class TypedResizeComposite<T extends Widget & RequiresResize> I like the idea that it will show up next to Composite but I think that feels same as deprecating the old one. If we want everybody to use Composite2 then we can just change Composite itself to add generics - which is OK with me.


--
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: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan <gok...@google.com>
Gerrit-Reviewer: Brian Slesinsky <skybr...@google.com>
Gerrit-Reviewer: Goktug Gokdogan <gok...@google.com>
Gerrit-Reviewer: Matthew Dempsky <mdemp...@gwtproject.org>
Gerrit-Reviewer: Thomas Broyer <t.bro...@gmail.com>
Gerrit-HasComments: Yes

--
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- You received this message because you are subscribed to the Google Groups "Google Web Toolkit 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.


Reply via email to