java.lang.AssertionError after upgrading from gwt 1.5.2 to gwt 1.6.4 (when run in hosted mode)

212 views
Skip to first unread message

scono1986

unread,
Apr 8, 2011, 12:44:25 AM4/8/11
to Google Web Toolkit
After upgrading from gwt 1.5.2 to gwt 1.6.4, I run my application in
hosted mode, it occurs the following errors:

====== Error 1 ======

[ERROR] Uncaught exception escaped
java.lang.AssertionError: A widget that has an existing parent widget
may not be added to the detach list
at
com.google.gwt.user.client.ui.RootPanel.detachOnWindowClose(RootPanel.java:
122)
at com.google.gwt.user.client.ui.RootPanel.get(RootPanel.java:197)

====== Error 2 ======
[ERROR] Uncaught exception escaped
java.lang.AssertionError: The style name 'margin-top' should be in
camelCase format
at com.google.gwt.dom.client.Style$.assertCamelCase$(Style.java:63)
at com.google.gwt.dom.client.Style$.setProperty$(Style.java:42)
at com.google.gwt.user.client.DOM.setStyleAttribute(DOM.java:1208)



Please help me fix these errors.
Thanks so much :))

Paul Robinson

unread,
Apr 10, 2011, 5:10:24 PM4/10/11
to google-we...@googlegroups.com

> java.lang.AssertionError: The style name 'margin-top' should be in
> camelCase format
> at com.google.gwt.dom.client.Style$.assertCamelCase$(Style.java:63)
> at com.google.gwt.dom.client.Style$.setProperty$(Style.java:42)
> at com.google.gwt.user.client.DOM.setStyleAttribute(DOM.java:1208)
When setting margin top in CSS, you use "margin-top", but when setting from javascript, you must use "marginTop". GWT is doing some sanity checking on your style names to make sure you're using the camel case version required for javascript.

In other words, you have a bug in your code: you should have specified "marginTop" in your code, and not "margin-top".

Paul

scono1986

unread,
Apr 10, 2011, 11:41:14 PM4/10/11
to Google Web Toolkit
In version gwt 1.5.2 I used "margin-top", my application runs well.
So after upgrading to gwt 1.6.4, If I still use "margin-top", apart
from the error message (AssertionError), isn't my application
affected ?
Reply all
Reply to author
Forward
0 new messages