Author: [EMAIL PROTECTED]
Date: Wed Sep 17 07:53:35 2008
New Revision: 3661

Modified:
     
changes/spoon/runAsync/samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java

Log:
Don't put ContentWidget.onLoad behind runAsync; run it synchronously.


Modified:  
changes/spoon/runAsync/samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java
==============================================================================
---  
changes/spoon/runAsync/samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java
     
(original)
+++  
changes/spoon/runAsync/samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java
     
Wed Sep 17 07:53:35 2008
@@ -15,8 +15,6 @@
   */
  package com.google.gwt.sample.showcase.client;

-import com.google.gwt.core.client.GWT;
-import com.google.gwt.core.client.RunAsyncCallback;
  import com.google.gwt.http.client.Request;
  import com.google.gwt.http.client.RequestBuilder;
  import com.google.gwt.http.client.RequestCallback;
@@ -321,21 +319,13 @@

    @Override
    protected void onLoad() {
-    GWT.runAsync(new RunAsyncCallback() {
-      public void onFailure(Throwable e) {
-        Window.alert("Could not load fragment: " + e);
-      }
+    // Initialize this widget if we haven't already
+    initialize();

-      public void onSuccess() {
-        // Initialize this widget if we haven't already
-        initialize();
-
-        // Select the first tab
-        if (getTabBar().getTabCount() > 0) {
-          tabBar.selectTab(0);
-        }
-      }
-    });
+    // Select the first tab
+    if (getTabBar().getTabCount() > 0) {
+      tabBar.selectTab(0);
+    }
    }

    /**

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

Reply via email to