Alex, a couple of days ago, you made the attached change which has broken
things...

On Tue, Aug 25, 2009 at 06:21, Fritz Zaucker <[email protected]> wrote:

> Hi,
>
> something seems to have changed in the trunk version (recently?) somewhere
> in the rpc calls or support functions.
>
> I do the following call:
>
>             this.rpc.callAsync( this.__authenticate, 'auth',
>                                user, password );
>
> user and password are just regular strings.
>
> This works fine with 0.8.2, but with svn revision r19893 I get the
> following
> error in the Apache log (and the same within the Qooxdoo callback handler):
>


{dworkin} /home/derrell/ME/qooxdoo.git/trunk/qooxdoo/framework/source/class
---> git diff 0330a02d^..0330a02d
diff --git a/qooxdoo/framework/source/class/qx/io/remote/RequestQueue.js
b/qooxdoo/framework/source/class/qx/io/remote/RequestQueue.js
index a02ceb2..2c1c8bc 100644
--- a/qooxdoo/framework/source/class/qx/io/remote/RequestQueue.js
+++ b/qooxdoo/framework/source/class/qx/io/remote/RequestQueue.js
@@ -215,17 +215,9 @@ qx.Class.define("qx.io.remote.RequestQueue",
       // Debug output
       this._debug();

-      // Establish event connection between qx.io.remote.Exchange instance
and
-      // qx.io.remote.Request
-      vTransport.addListener("sending", vRequest._onsending, vRequest);
-      vTransport.addListener("receiving", vRequest._onreceiving, vRequest);
-      vTransport.addListener("completed", vRequest._oncompleted, vRequest);
-      vTransport.addListener("aborted", vRequest._onaborted, vRequest);
-      vTransport.addListener("timeout", vRequest._ontimeout, vRequest);
-      vTransport.addListener("failed", vRequest._onfailed, vRequest);
-
       // Establish event connection between qx.io.remote.Exchange and me.
       vTransport.addListener("sending", this._onsending, this);
+      vTransport.addListener("receiving", this._onreceiving, this);
       vTransport.addListener("completed", this._oncompleted, this);
       vTransport.addListener("aborted", this._oncompleted, this);
       vTransport.addListener("timeout", this._oncompleted, this);
@@ -294,6 +286,20 @@ qx.Class.define("qx.io.remote.RequestQueue",
           this.debug("ActiveCount: " + this.__activeCount);
         }
       }
+
+      e.getTarget().getRequest()._onsending(e.clone());
+    },
+
+
+    /**
+     * Listens for the "receiving" event of the transport object and
delegate
+     * the event to the current request object.
+     *
+     * @param e {qx.event.type.Event} event object
+     * @return {void}
+     */
+    _onreceiving : function(e) {
+      e.getTarget().getRequest()._onreceiving(e.clone());
     },


@@ -319,6 +325,14 @@ qx.Class.define("qx.io.remote.RequestQueue",
       }

       this._remove(e.getTarget());
+
+      // delegate the event to the handler method of the request depending
+      // on the current type of the event (
completed|aborted|timeout|failed )
+      var request = e.getTarget().getRequest();
+      var requestHandler = "_on" + e.getType();
+      if (request[requestHandler])
{                                         <----
+        request[requestHandler](e.clone());
+      }
     },

In my test using RpcExample, the request goes out, the proper response comes
back (as indicated by Firebug), but it's dying at the line indicated by the
arrow because 'request' is null. This variable is null because e.getTarget()
returns the Exchange object, but that object has already been disposed at
this point.

I'll turn this back to you. I'm not sure what you were trying to do.

Derrell
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to