From 08c1976ca068031481e78cf0f8fba7e25d62c126 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Manuel=20Carrasco=20Mo=C3=B1ino?= Date: Sun, 17 Mar 2013 23:10:08 +0100 Subject: [PATCH] use arguments --- .../gwt/query/client/plugins/Deferred.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Deferred.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Deferred.java index 5c1ce194..e94deae3 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Deferred.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Deferred.java @@ -53,11 +53,11 @@ public class Deferred extends GQuery implements Promise.Deferred { * * doSomething.progress(new Function() { * public void f() { - * String hi = getArgument(0); + * String hi = arguments(0); * } * }).done(new Function() { * public void f() { - * String done = getArgument(0); + * String done = arguments(0); * } * }); * @@ -123,8 +123,9 @@ public class Deferred extends GQuery implements Promise.Deferred { * Request req1 = loginFact.api().login(null, null); * Request req2 = srvFact.api().getCurrentUser(); * - * Deferred.when(new PromiseRF(req1), new PromiseRF(req2) - * .done(new Function() { + * Promise requestingAll = Deferred.when(new PromiseRF(req1), new PromiseRF(req2); + * + * requestingAll.done(new Function() { * public void f() { * SessionProxy session = arguments(0, 0); * UserProxy user = arguments(1, 0); @@ -158,18 +159,18 @@ public class Deferred extends GQuery implements Promise.Deferred { /** * Utility class used to create promises for RPC services. *
-   *        PromiseRPC gretting = new PromiseRPC();
+   *        PromiseRPC greeting = new PromiseRPC();
    *        
    *        GreetingServiceAsync greetingService = GWT.create(GreetingService.class);
-   *        greetingService.greetServer("hi", gretting);
+   *        greetingService.greetServer("hi", greeting);
    *        
-   *        gretting.fail(new Function(){
+   *        greeting.fail(new Function(){
    *          public void f() {
-   *            Throwable error = getArgument(0);
+   *            Throwable error = arguments(0);
    *          }
    *        }).done(new Function(){
    *          public void f() {
-   *            String response = getArgument(0);
+   *            String response = arguments(0);
    *          }
    *        });
    * 
-- 2.39.5