Brian Slesinsky has posted comments on this change.

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


Patch Set 5:

Goktug and I talked about this. I'll try to summarize:

- How did this get so complicated? UIBinder requires a zero-argument constructor and also requires you to pass "this" to its methods. So we cannot use constructors for initialization, and that's why we have initWidget() in the first place.

- Why not have a separate class that supports delegates? Because that would force PanelComposite and FocusComposite to make a decision on which class to inherit from. We want to defer that decision to the subclass when it calls either the one or two-argument version of initWidget().

- Why not have Composite<W,D>? Because in the simple case we only want one type variable for the wrapped widget. It looks a little weird and it's a bit hard to explain, but examples make sense.

- Can we make delegation transparent for parent-child relationships, similar to web components? Probably not because lots of things would break. (Maybe we should update the documentation on HasWidgets to say that it adds its argument as a descendant.)

- Can we make delegation of event handlers transparent? Probably not a good idea, because it adds complexity and relatively few event handlers check the source. (Maybe update the addFocusHandler/addBlurHandler javadoc to say that the source may be a descendant?)

--
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: 5
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan <[email protected]>
Gerrit-Reviewer: Brian Slesinsky <[email protected]>
Gerrit-Reviewer: Goktug Gokdogan <[email protected]>
Gerrit-Reviewer: Jens Nehlmeier <[email protected]>
Gerrit-Reviewer: Leeroy Jenkins <[email protected]>
Gerrit-Reviewer: Matthew Dempsky <[email protected]>
Gerrit-Reviewer: Thomas Broyer <[email protected]>
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to