On 2 sep, 19:56, [email protected] wrote: > Revision: 6073 > Author: [email protected] > Date: Wed Sep 2 10:55:41 2009 > Log: Removing an assertion that introduced a breaking change. > > Patch by: jlabanca > Review by: jgw (TBR) > > http://code.google.com/p/google-web-toolkit/source/detail?r=6073 > > Modified: > /trunk/user/src/com/google/gwt/user/client/ui/Button.java > > ======================================= > --- /trunk/user/src/com/google/gwt/user/client/ui/Button.java Wed Sep 2 > 07:58:52 2009 > +++ /trunk/user/src/com/google/gwt/user/client/ui/Button.java Wed Sep 2 > 10:55:41 2009 > @@ -54,7 +54,6 @@ > assert Document.get().getBody().isOrHasChild(element); > > Button button = new Button(element); > - assert "button".equalsIgnoreCase(button.getButtonElement().getType()); > > // Mark it attached and remember it for cleanup. > button.onAttach();
As I said when posting the initial patch, that was something I was"unsure about" (and I explicitly pointed out that it was breaking backwards compat') http://gwt-code-reviews.appspot.com/61809 ...but on the other hand, TextBox.wrap() has an assertion on type=text (actually in the TextBox(Element) ctor) which makes it unable to wrap an <input type=password> (use a PasswordTextBox for that) whereas PasswordTextBox doesn't add any particular method or behavior change to TextBox. This is a very similar situation to Button vs. SubmitButton and ResetButton. --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
