TreeGrid - ListGrid - getBaseStyle() error

Hi,

With the latest nightly builds (18-12-08 and 17-12-08), there seems to be an error when calling the getBaseStyle() method of either TreeGrid or ListGrid:

Here is the complete error log (relevant part in bold):

[ERROR] Unable to load module entry point class com.mycompany.client.HelloWorld (see associated exception for details)
com.google.gwt.core.client.JavaScriptException: (RangeError): com.google.gwt.dev.shell.HostedModeException: Expected primitive type int; actual value was undefined
	at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:51)
	at com.google.gwt.dev.shell.ie.SwtOleGlue.convertVariantsToObjects(SwtOleGlue.java:57)
	at com.google.gwt.dev.shell.ie.IDispatchImpl.callMethod(IDispatchImpl.java:119)
	at com.google.gwt.dev.shell.ie.IDispatchProxy.invoke(IDispatchProxy.java:155)
	at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:294)
	at com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:194)
	at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:117)
	at org.eclipse.swt.internal.ole.win32.COM.VtblCall(Native Method)
	at org.eclipse.swt.internal.ole.win32.IDispatch.Invoke(IDispatch.java:64)
	at org.eclipse.swt.ole.win32.OleAutomation.invoke(OleAutomation.java:493)
	at org.eclipse.swt.ole.win32.OleAutomation.invoke(OleAutomation.java:417)
	at com.google.gwt.dev.shell.ie.ModuleSpaceIE6.doInvokeOnWindow(ModuleSpaceIE6.java:67)
	at com.google.gwt.dev.shell.ie.ModuleSpaceIE6.doInvoke(ModuleSpaceIE6.java:152)
	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:447)
	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:228)
	at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
[b]	at com.smartgwt.client.widgets.BaseWidget.getPropertyAsString(BaseWidget.java)
	at com.smartgwt.client.widgets.BaseWidget.getAttributeAsString(BaseWidget.java:298)
	at com.smartgwt.client.widgets.grid.ListGrid.getBaseStyle(ListGrid.java:1028)[/b]
	at com.mycompany.client.HelloWorld.onModuleLoad(HelloWorld.java:66)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:320)
	at com.google.gwt.dev.shell.BrowserWidget.attachModuleSpace(BrowserWidget.java:329)
	at com.google.gwt.dev.shell.ie.BrowserWidgetIE6.access$300(BrowserWidgetIE6.java:37)
	at com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.gwtOnLoad(BrowserWidgetIE6.java:76)
	at com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.invoke(BrowserWidgetIE6.java:139)
	at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:294)
	at com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:194)
	at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:117)
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1925)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2966)
	at com.google.gwt.dev.GWTShell.pumpEventLoop(GWTShell.java:720)
	at com.google.gwt.dev.GWTShell.run(GWTShell.java:593)
	at com.google.gwt.dev.GWTShell.main(GWTShell.java:357)
 number: -2146828279
 description: com.google.gwt.dev.shell.HostedModeException: Expected primitive type int; actual value was undefined
	at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:51)
	at com.google.gwt.dev.shell.ie.SwtOleGlue.convertVariantsToObjects(SwtOleGlue.java:57)
	at com.google.gwt.dev.shell.ie.IDispatchImpl.callMethod(IDispatchImpl.java:119)
	at com.google.gwt.dev.shell.ie.IDispatchProxy.invoke(IDispatchProxy.java:155)
	at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:294)
	at com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:194)
	at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:117)
	at org.eclipse.swt.internal.ole.win32.COM.VtblCall(Native Method)
	at org.eclipse.swt.internal.ole.win32.IDispatch.Invoke(IDispatch.java:64)
	at org.eclipse.swt.ole.win32.OleAutomation.invoke(OleAutomation.java:493)
	at org.eclipse.swt.ole.win32.OleAutomation.invoke(OleAutomation.java:417)
	at com.google.gwt.dev.shell.ie.ModuleSpaceIE6.doInvokeOnWindow(ModuleSpaceIE6.java:67)
	at com.google.gwt.dev.shell.ie.ModuleSpaceIE6.doInvoke(ModuleSpaceIE6.java:152)
	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:447)
	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:228)
	at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
	at com.smartgwt.client.widgets.BaseWidget.getPropertyAsString(BaseWidget.java)
	at com.smartgwt.client.widgets.BaseWidget.getAttributeAsString(BaseWidget.java:298)
	at com.smartgwt.client.widgets.grid.ListGrid.getBaseStyle(ListGrid.java:1028)
	at com.mycompany.client.HelloWorld.onModuleLoad(HelloWorld.java:66)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:320)
	at com.google.gwt.dev.shell.BrowserWidget.attachModuleSpace(BrowserWidget.java:329)
	at com.google.gwt.dev.shell.ie.BrowserWidgetIE6.access$300(BrowserWidgetIE6.java:37)
	at com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.gwtOnLoad(BrowserWidgetIE6.java:76)
	at com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.invoke(BrowserWidgetIE6.java:139)
	at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:294)
	at com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:194)
	at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:117)
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1925)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2966)
	at com.google.gwt.dev.GWTShell.pumpEventLoop(GWTShell.java:720)
	at com.google.gwt.dev.GWTShell.run(GWTShell.java:593)
	at com.google.gwt.dev.GWTShell.main(GWTShell.java:357)
	at com.smartgwt.client.widgets.BaseWidget.getPropertyAsString(Native Method)
	at com.smartgwt.client.widgets.BaseWidget.getAttributeAsString(BaseWidget.java:298)
	at com.smartgwt.client.widgets.grid.ListGrid.getBaseStyle(ListGrid.java:1028)
	at com.mycompany.client.HelloWorld.onModuleLoad(HelloWorld.java:66)

It should be easy to reproduce, but I can post a sample code if needed.

Thanks,

Dogan

Is there anyone else experiencing this issue?

I’ve tried with revision 250 (21-01-09), but I still get the same error (“Expected primitive type int; actual value was undefined”).

Here is a very simple code that triggers the error.

Create class MyTreeGrid.java

public class MyTreeGrid extends TreeGrid
{

    public MyTreeGrid()
    {
        super();
    }

    protected String getBaseStyle(ListGridRecord record, int rowNum, int colNum)
    {
        return getBaseStyle();
    }
}

Then create an instance in you application:

...

MyTreeGrid myTreeGrid = new MyTreeGrid ();

...

The code above works fine with any version released before 17-12-08.

There was a corner case between the no-op version and version with params of the getBaseStyle method. Fixed in SVN.

Sanjiv