Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

IE9 Fails using SmartGWTPro with child DrawPanes.

$
0
0
Here is a sample code snippet that works fine in other browsers but fails in IE9. Using SmartGWTPro 4.0p, GWT 2.5.1 and Java 1.7.
Code:

package com.testApp.client;

import com.google.gwt.core.client.EntryPoint;
import com.smartgwt.client.widgets.drawing.DrawPane;

public class TestApp implements EntryPoint
{
    public void onModuleLoad()
    {
        DrawPane p1 = new DrawPane();
        p1.setWidth(400);
        p1.setHeight(400);
        p1.setLeft(10);
        p1.setTop(10);
        p1.setBackgroundColor("Gray");
        p1.draw();
        for (int j=0; j<5; j++)
        {
            DrawPane p2 = new DrawPane();
            p2.setWidth(20);
            p2.setHeight(360);
            p2.setLeft(j * 25 + 10);
            p2.setTop(10);
            p2.setBackgroundColor("Blue");
            p2.draw();
            p1.addChild(p2);
            for (int i=0; i<20; i++)
            {
                DrawPane p = new DrawPane();
                p.setWidth(10);
                p.setHeight(10);
                p.setLeft(5);
                p.setTop(i * 15 + 5);
                p.setBackgroundColor("Red");
                p2.addChild(p);
            }
        }
    }
}

Quote:

ERROR: Unable to load module entry point class com.testApp.client.TestApp (see associated exception for details)
com.google.gwt.core.client.JavaScriptException: (Error) @com.smartgwt.client.widgets.Canvas::addChild(Lcom/smartgwt/client/widgets/Canvas;)([Java object: com.smartgwt.client.widgets.drawing.DrawPane@24577 265]): Invalid argument.
at com.google.gwt.dev.shell.BrowserChannelServer.invo keJavascript(BrowserChannelServer.java:249)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke (ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative( ModuleSpace.java:571)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeO bject(ModuleSpace.java:279)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNati veObject(JavaScriptHost.java:91)
at com.smartgwt.client.widgets.Canvas.addChild(Canvas .java)
at com.testApp.client.TestApp.onModuleLoad(TestApp.ja va:35)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(Module Space.java:406)
at com.google.gwt.dev.shell.OophmSessionHandler.loadM odule(OophmSessionHandler.java:200)
at com.google.gwt.dev.shell.BrowserChannelServer.proc essConnection(BrowserChannelServer.java:526)
at com.google.gwt.dev.shell.BrowserChannelServer.run( BrowserChannelServer.java:364)
at java.lang.Thread.run(Thread.java:722)
ERROR: Failed to load module 'TestApp' from user agent 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET CLR 1.1.4322; .NET4.0C; .NET4.0E; InfoPath.3; MS-RTC LM 8)' at 127.0.0.1:58895

Viewing all articles
Browse latest Browse all 4756

Trending Articles