Jens Nehlmeier has posted comments on this change.

Change subject: Utility to store multiple HandlerRegistrations
......................................................................


Patch Set 3:

(1 comment)

....................................................
File user/src/com/google/web/bindery/event/shared/HandlerRegistrationCollection.java Line 47: public static HandlerRegistrationCollection create(HandlerRegistration... handlers) {
What about something like:

HandlerRegistration hr = HandlerRegistrations.wrapAll(hr1, hr2); instead?

wrapAll() would then create a new HandlerRegistration instance whose removeHandler() method iterates through the var args array and delegates the removeHandler() call to each element of the array.

I think this would work well if you know all handlers at compile time. This approach would also not introduce LinkedList to the code base (which adds quite a bit of JS in the final app) if you don't really need the collection.add() API style of this HandlerRegistrationCollection.

The developer can still add this wrapper HandlerRegistration to this HandlerRegistrationCollection if the code also contains dynamically created HandlerRegistration instances.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I75ccd120b78e1be47fa6a1e4f20c607c68203c31
Gerrit-PatchSet: 3
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Daniel Kurka <danku...@google.com>
Gerrit-Reviewer: Daniel Kurka <danku...@google.com>
Gerrit-Reviewer: Jens Nehlmeier <jens.nehlme...@gmail.com>
Gerrit-Reviewer: Leeroy Jenkins <jenk...@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 "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.


Reply via email to