Hmmm.... interesting. I never noticed the assert before, but I don't see why you are coming across it? Are you manually wrapping elements? Because it's perfectly legal to do
TextBox t = new PasswordTextBox(); If you notice the assert is only called in very specific instances. If you are actually wrapping DOM elements, you've got to ask yourself if you are doing it correctly. But it's still perfectly legal to assign a PasswordTextBox instance to a TextBox variable. It's not legal to wrap a password DOM element with a TextBox and that is pretty clear why that would be the case. On Wed, Mar 25, 2009 at 7:10 PM, Eduard Dudar <[email protected]>wrote: > > Hello community! > > As you all know HTML has 2 types (definitely more but 2 is interesting > there) of <input>: text and password. As you also know they are pretty > much the same. Dots versus normal characters nothing else. When you > will look into appropriate GWT classes you also will find that one > extends another and the only own that PasswordTextBox has is wrap(...) > mostly because it is static and "gwt-PasswordTextBox". > > From object-oriented point of this this all makes me think that > PasswordTextBox is TextBox "inside" and if I will make 1 TextBox and 1 > PasswordTextBox I will likely name both of them as TextBox. Why not? > > And that's why the question is: Why this assertions are in protected > constructors which always fails in Hosted Mode and restrict me from > generalizing all fields on form by TextBox pattern. > > I see why such type of restriction is useful. For sure I shouldn't > wrap type="image" or type="radio" with TextBox. But may be it should > look different when we're wrapping expendable elements like "text" and > "password" > > Thanks! > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
