Colin Alworth has posted comments on this change.

Change subject: Add interfaces for widgets.
......................................................................


Patch Set 6:

(4 comments)

....................................................
File user/src/com/google/gwt/dom/client/HasStyle.java
Line 29:   void setStyleName(String styleName);
Might be worth adding hasStyleName, as this was recently added to Element - Goktug indicated in that review that a toggleStyleName is on the way as well. https://gwt-review.googlesource.com/#/c/3070/


....................................................
File user/src/com/google/gwt/dom/client/IsElement.java
Line 61:   void appendChild(IsElement element);
This method seems out of place - it is the closest we get to dom manipulation - no removeChild(IsElement) nor IsElement getParentElement() or any getChild (which may not be). Is there a reason you picked this and removeFromParent, but not other dom methods? Variance issues almost explain it, but then I noticed that you needed to add new methods just to support this in Element itself.

And since you already are needing to add new methods in Element to deal with IsElement vs Node, would it make sense then to add new methods for these?


....................................................
File user/src/com/google/gwt/user/client/ui/IsUIObject.java
Line 27:   IsElement getIsElement();
My concern there would be that we'd no longer have a way to get access to the element as a jso in the code that needs it. If I wanted the element so I could treat it as a InputElement, the JSO.cast() is no longer available to me, only the regular Java cast. Not a huge loss, but it definitely is a breaking change.

Simple/ugly way around that might be to rename IsElement.asElement to IsElement.cast, with the JSO.cast generics. Returns null for stubs, and with a real element lets you cast as usual.


....................................................
File user/src/com/google/gwt/user/client/ui/IsWidget2.java
Line 28: public interface IsWidget2 extends IsWidget, IsUIObject, EventListener, HasHandlers, (Sorry if I missed this discussion elsewhere, but) What is the philosophical thinking on IsWidget vs IsWidget2? This is for mocking Widget, while IsWidget is for Composite-free composition? If that is the idea, what about another name than IsWidget2, which seems to suggest 'better isWidget' rather than 'mockable iswidget'.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibd17162d37e367720829bcdaf9a350e446c833b9
Gerrit-PatchSet: 6
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Stephen Haberman <stephen.haber...@gmail.com>
Gerrit-Reviewer: Colin Alworth <niloc...@gmail.com>
Gerrit-Reviewer: Daniel Kurka <danku...@google.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