Goktug Gokdogan has posted comments on this change.

Change subject: Adds FocusComposite and PanelComposite.
......................................................................


Patch Set 1:

I thought little bit more on this.

As we must always call specific addXYZHandler methods expecting specific handler classes, I think it is impossible to avoid boilerplate without codegen.

The minimal boilerplate that I found is my previous proposal of updating the source of the event (we can put a helper in composite for source override). Anybody who wants to be good citizen can choose to do that.

If we do code generation, we can simplify it a lot and everybody can use it:

interface FocusForwardingHandlers extends HasXHandlers, HasYHandlers, ForwardingHandler;

  FocusForwardingHandlers helper;

  protected void initWidget(Widget widget, T delegate) {
    super.initWidget(widget, delegate);
    helper = GWT.create(FocusForwardingHandlers.class);
    helper.init(this, delegate);
  };

  public HandlerRegistration addFocusHandler(FocusHandler handler) {
    return helper.addHandler(handler);
  }

but writing the codegen is also a lot of work. I'm not sure if it will worth for just fixing the source of event.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I372f9c4942c11b799eeb57870163dd999ad095cb
Gerrit-PatchSet: 1
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: 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