John,

I wanted to run this one-liner by you before committing. I'm seeing
the JSE below in hosted mode when the body of my PagingScrollTable is
empty and has 0 height. The headerHeight is positive and (totalHeight
- headerHeight - footerHeight) comes out to a negative number. The
patch following the stacktrace fixes the problem.

Thanks,
Isaac


[ERROR] Uncaught exception escaped
com.google.gwt.core.client.JavaScriptException: (Error): Invalid argument.
 number: -2147024809
 description: Invalid argument.
        at com.google.gwt.dom.client.Style$.setProperty$(Native Method)
        at com.google.gwt.user.client.DOM.setStyleAttribute(DOM.java:1201)
        at 
com.google.gwt.gen2.table.client.AbstractScrollTable.resizeTablesVerticallyNow(AbstractScrollTable.java:1375)
        at 
com.google.gwt.gen2.table.client.AbstractScrollTable$1.execute(AbstractScrollTable.java:614)
        at 
com.google.gwt.user.client.CommandExecutor.doExecuteCommands(CommandExecutor.java:311)
        at 
com.google.gwt.user.client.CommandExecutor$2.run(CommandExecutor.java:206)
        at com.google.gwt.user.client.Timer.fireImpl(Timer.java:164)
        at com.google.gwt.user.client.Timer.fireAndCatch(Timer.java:150)
        at com.google.gwt.user.client.Timer.fire(Timer.java:142)



Index: src/com/google/gwt/gen2/table/client/AbstractScrollTable.java
===================================================================
--- src/com/google/gwt/gen2/table/client/AbstractScrollTable.java       
(revision
1195)
+++ src/com/google/gwt/gen2/table/client/AbstractScrollTable.java       
(working copy)
@@ -1395,7 +1395,7 @@
       DOM.setStyleAttribute(footerWrapper, "height", footerHeight + "px");
     }
     DOM.setStyleAttribute(dataWrapper, "height",
-        (totalHeight - headerHeight - footerHeight) + "px");
+        Math.max(totalHeight - headerHeight - footerHeight, 0) + "px");
     DOM.setStyleAttribute(dataWrapper, "overflow", "hidden");
     DOM.setStyleAttribute(dataWrapper, "overflow", "auto");
     scrollTables(true);

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to