PDA

View Full Version : [FIXED] [Beta 2] JavaScriptException in hosted mode



goodwrench
1 May 2008, 10:51 AM
I keep getting those JavaScriptExceptions in the hosted mode only (I run it under Eclipse) when I try to open any combo-box and select an item from it:

com.google.gwt.core.client.JavaScriptException: (RangeError): com.google.gwt.dev.shell.HostedModeException: Calling method 'newInstance': attempt to use JavaScript 'undefined' as a value, expected int
....
at com.extjs.gxt.ui.client.XDOM.getViewportSize(XDOM.java:188)

In XDOM.getViewportSize I see this code


} else if (typeof $doc.documentElement != 'undefined'
&& typeof $doc.documentElement.clientWidth !=
'undefined' && $doc.documentElement.clientWidth != 0) {
vw = document.documentElement.clientWidth;
vh = $wnd.innerHeight;

The section inside "if" looks like has a typo. Should it be instead:



} else if (typeof $doc.documentElement != 'undefined'
&& typeof $doc.documentElement.clientWidth !=
'undefined' && $doc.documentElement.clientWidth != 0) {
vw = $doc.documentElement.clientWidth;
vh = $doc.documentElement.clientHeight;

darrellmeyer
20 May 2008, 9:16 PM
Fix is in SVN.