> Are you manually wrapping elements? Because
> it's perfectly legal to do
>
> TextBox t = new PasswordTextBox();
Yes, GWT doesn't build DOM structure but only adds a behavior to
special elements. And yes, that is legal to assign new PasswordTextBox
to TextBox but with public constructor usage and not the case.
> 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.
Thanks, already asked. An clearly I don't see any reason why I
shouldn't treat password box as simple text box? Because it looks
different? The only difference between them is rendering one. If you
will use some symbolic font your text box will look exactly as
password do. As DOM elements they are absolutely identical and only
browser should know there how to render text or password.
> It's not legal to wrap a password DOM element with a
> TextBox and that is pretty clear why that would be the case.
Interesting... And why so? Element that I have after DOM.getElementById
(...) is a raw one. I can cast it to InputElement with as(...). At
this point I have general input that represents all types of input,
either image or text. I can do setDir or setSrc for text element on
page without any getType() checking. And that is legal. InputElement.as
(DOM.getElementById("myPassword")).setSrc() is legal. And again there,
why TextBox.wrap("myPassword").setText("...") is not legal?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---