RPC async handler after disposing

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RPC async handler after disposing

voger
I have exactly the same problem with the one that is mentioned in this
message from 2011
http://qooxdoo.678.n2.nabble.com/RPC-callAsync-problem-td6507653.html

The problem is that when a widget tries to make a RPC call but the
widget is disposed before the call completes, when the call finally
completes it tries to call the handler function but the context is
already disposed. I tried the solution in that message but I still have
the same problem

073267 Assertion error! Trying to call a bound function with a disposed
object as context: qssite.ui.form.widget.SimpleCountrySelect[8952-0] ::
qssite.ui.form.widget.SimpleCountrySelect.prototype.__onLoaded(): Called
assertFalse with 'true'

This is my portion of the code that makes the rpc call

var rpc = this.__rpc = new qx.io.remote.Rpc('/remote', 'qssite');

var options = {
    self: this,
    args: null,
    attempt: true
    };

this.__asyncRef = rpc.callAsync(qx.lang.Function.create(this.__onLoaded,
options), 'qssite.get_countries_list');

and in my destruct function I have

this.__rpc.abort(this.__asyncRef);

------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RPC async handler after disposing

Dietrich Streifert
This may be related to the following pull request by Cajus:


--
Mit freundlichen Grüßen
Dietrich Streifert

Am 27.11.2015 um 22:41 schrieb voger <[hidden email]>:

I have exactly the same problem with the one that is mentioned in this
message from 2011
http://qooxdoo.678.n2.nabble.com/RPC-callAsync-problem-td6507653.html

The problem is that when a widget tries to make a RPC call but the
widget is disposed before the call completes, when the call finally
completes it tries to call the handler function but the context is
already disposed. I tried the solution in that message but I still have
the same problem

073267 Assertion error! Trying to call a bound function with a disposed
object as context: qssite.ui.form.widget.SimpleCountrySelect[8952-0] ::
qssite.ui.form.widget.SimpleCountrySelect.prototype.__onLoaded(): Called
assertFalse with 'true'

This is my portion of the code that makes the rpc call

var rpc = this.__rpc = new qx.io.remote.Rpc('/remote', 'qssite');

var options = {
   self: this,
   args: null,
   attempt: true
   };

this.__asyncRef = rpc.callAsync(qx.lang.Function.create(this.__onLoaded,
options), 'qssite.get_countries_list');

and in my destruct function I have

this.__rpc.abort(this.__asyncRef);

------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------

_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Loading...