Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    SmartGWT and GWT 2.1 RC1 Issue

    Hi,

    I am trying to write a small SmartGWT 2.2 HelloWorld application using the latest GWT 2.1 RC1 toolkit on eclipse. But it does not seem to work for me. It seems to fail when I try to instantiate the SmartGWT IButton object in the onModuleLoad() call. Does anyone know of any issues regarding devloping SmartGWT apps with the latest GWT toolkit? Sample code below.

    Thanks,

    Mike

    public void onModuleLoad() {
    IButton button = new IButton("Hello World");
    button.addClickHandler(new ClickHandler() {
    public void onClick(ClickEvent event) {
    SC.say("Hello World from SmartGWT");
    }
    });

    button.draw();

    }

    #2
    There's no 100% compatibility between SmartGWT and GWT.

    You have to choose one of the two, cannot use together.

    Comment


      #3
      ?!
      You cannot use SmartGWT without GWT!
      Maybe you wanted to say that you should not mix GWT components with SmartGWT components (it is possible as shown in Showcase, but does not look nice), but I don't see using GWT components in mazzi's code.

      Comment


        #4
        Originally posted by mazzi
        Hi,

        I am trying to write a small SmartGWT 2.2 HelloWorld application using the latest GWT 2.1 RC1 toolkit on eclipse. But it does not seem to work for me. It seems to fail when I try to instantiate the SmartGWT IButton object in the onModuleLoad() call. Does anyone know of any issues regarding devloping SmartGWT apps with the latest GWT toolkit? Sample code below.

        Thanks,

        Mike

        public void onModuleLoad() {
        IButton button = new IButton("Hello World");
        button.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
        SC.say("Hello World from SmartGWT");
        }
        });

        button.draw();

        }
        What error are you seeing? Post the complete code for your sample including the imports. You might be using the incorrect ClickEvent or ClickHandler class from a different package.

        Comment


          #5
          Originally posted by smartgwt.dev
          What error are you seeing? Post the complete code for your sample including the imports. You might be using the incorrect ClickEvent or ClickHandler class from a different package.
          Hi,

          I have attached the exception stack trace below. I have even simplified the example further to rule out the issues that you mentioned. It still fails the same way. It seems to fail when it tries to init the widget. But anyway has anybody tried to run a simple SmartGWT example using the latest GWT 2.1 RC1 toolkit. I mean that would be the best way to find out for sure.

          Thanks,

          Mike.


          Here's the exception stack:


          14:04:38.296 [ERROR] [hellosgwt] Unable to load module entry point class com.baa.hello.client.HelloSGWT (see associated exception for details)

          com.google.gwt.core.client.JavaScriptException: (TypeError): '$wnd.isc.Browser' is null or not an object
          number: -2146823281
          description: '$wnd.isc.Browser' is null or not an object
          at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:237)
          at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:126)
          at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:562)
          at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:289)
          at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
          at com.smartgwt.client.core.JsObject.init(JsObject.java)
          at com.smartgwt.client.core.JsObject.initialize(JsObject.java:38)
          at com.smartgwt.client.core.JsObject.<clinit>(JsObject.java:32)
          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.MethodAdaptor.invoke(MethodAdaptor.java:103)
          at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
          at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
          at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:326)
          at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:207)
          at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:126)
          at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:562)
          at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:289)
          at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
          at com.smartgwt.client.widgets.BaseWidget.init(BaseWidget.java)
          at com.smartgwt.client.widgets.BaseWidget.<clinit>(BaseWidget.java:46)
          at com.baa.hello.client.HelloSGWT.onModuleLoad(HelloSGWT.java:29)
          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:397)
          at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:183)
          at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:510)
          at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
          at java.lang.Thread.run(Thread.java:619)

          Here's the complete code:

          package com.baa.hello.client;

          import com.google.gwt.core.client.EntryPoint;
          import com.google.gwt.core.client.GWT;
          import com.smartgwt.client.widgets.IButton;

          /**
          * Entry point classes define <code>onModuleLoad()</code>.
          */
          public class HelloSGWT implements EntryPoint {
          /**
          * The message displayed to the user when the server cannot be reached or
          * returns an error.
          */
          private static final String SERVER_ERROR = "An error occurred while "
          + "attempting to contact the server. Please check your network "
          + "connection and try again.";

          /**
          * Create a remote service proxy to talk to the server-side Greeting service.
          */
          private final GreetingServiceAsync greetingService = GWT
          .create(GreetingService.class);

          /**
          * This is the entry point method.
          */
          public void onModuleLoad() {
          IButton button = new IButton("Hello World");
          }
          }

          Comment


            #6
            Have you seen the Hello World sample in the distribution? If you still cannot figure it out, read the FAQ sticky carefully and also post your host html file and module xml file.

            Comment


              #7
              Originally posted by smartgwt.dev
              Have you seen the Hello World sample in the distribution? If you still cannot figure it out, read the FAQ sticky carefully and also post your host html file and module xml file.
              I am sorry I didn't get what you're trying to tell me. I have seen the Hello world sample and it works fine with the previous GWT release, but it does not seem to work with the newer GWT 2.1 release. OK, maybe I am doing something wrong, but can I at least ask you this favor of testing it yourself on the new GWT 2.1 toolkit. I would really appreciate it.

              Thanks,
              Mike

              Comment


                #8
                Originally posted by mazzi
                I am sorry I didn't get what you're trying to tell me. I have seen the Hello world sample and it works fine with the previous GWT release, but it does not seem to work with the newer GWT 2.1 release. OK, maybe I am doing something wrong, but can I at least ask you this favor of testing it yourself on the new GWT 2.1 toolkit. I would really appreciate it.

                Thanks,
                Mike
                ah, it wasn't clear from your earlier posts that this issue is only occurring with GWT 2.1RC1 while it works with previous GWT versions. We'll definitely check it out. Thanks!

                Comment


                  #9
                  Originally posted by mazzi
                  I am sorry I didn't get what you're trying to tell me. I have seen the Hello world sample and it works fine with the previous GWT release, but it does not seem to work with the newer GWT 2.1 release. OK, maybe I am doing something wrong, but can I at least ask you this favor of testing it yourself on the new GWT 2.1 toolkit. I would really appreciate it.

                  Thanks,
                  Mike
                  The helloworld-2.0 sample which is part of the Smart GWT distribution works fine with GWT 2.1.0 RC1. The showcase sample also works well and the load time and overall performance in hosted mode seems to have improved significantly with GWT 2.1.0 RC1.

                  Comment

                  Working...
                  X