Hi Fabian,
thanks for your help but my problem is not resolved ; In my case I need to
get value of the call.

The old way (with qx 0.7.1) :

req.addEventListener("completed",qx.lang.Function.bind(function(e) {
     var response = e.getData();
     alert(response.result); // display my data
     ....
}

The new way (with qx 0.7.2) :

req.addEventListener("completed",qx.lang.Function.bind(function(e) {
     var response = e;
    alert(e); // display [qx.event.type.DataEvent]
    alert(response.result); // error undefined
    alert(e.getData()); // warning in qx 0.7.2
     ....
}

e is an instance of qx.event.type.DataEvent
void qx.event.type.DataEvent:getData() => Returns the (computed) value of
the property data.

Finally I don't understand how get value of my async call without have a
warning message.
Any idea ?

frederic




Fabian Jakobs-2 wrote:
> 
> frederic schrieb:
>> Hello,
>> I've updated my qooxdoo sdk to 0.7.2 and now I have a warning using this
>> code :
>>
>> var req=new qx.io.remote.Rpc();
>> req.set({url: SERVICE_URL, serviceName: "myservice", crossDomain: false,
>> timeout: 30000});
>> req.callAsyncListeners(true,"myfunction",[param1,param2]);
>> req.addEventListener("completed",qx.lang.Function.bind(function(e) {
>>     var response = e.getData();
>>     ....
>> }
>>
>> The warning in firebug :
>> WARN: qx.io.remote.Response: The method 'qx.io.remote.Response:getData'
>> of
>> class 'qx.io.remote.Response' is deprecated: This method is no longer
>> needed
>> since the event object is now an instance of the Response
>> class.FireBug.js
>>
>> How to solve the problem ?
>>
>> cheers
>> Frederic
>>   
> For 0.7.2 we have added warnings to all deprecated methods, so you may 
> encounter more of such warnings. Other than printing a warning and a 
> stack trace your code should still work as before. The warnings are only 
> printed in the build version and can be turned off by setting the 
> variant "qx.deprecationWarnings" to "off".
> 
> In this case the event fired by the io.remote system has changed. Before 
> it was a DataEvent with the Response instance set to the data field. 
> This has benn changes in a way that now the Respopnse class itself is 
> the event and the "getData" method is only there to emulate the old 
> interface. If you see a "getData" call on a event fired by io.remote you 
> can simply remove it.
> 
> In your code:
> 
> var response = e.getData();
> 
> 
> is the same as
> 
> var response = e;
> 
> 
> 
> 
> I hope that helps,
> 
> Best Fabian
> 
> -- 
> Fabian Jakobs
> JavaScript Framework Developer
> 
> 1&1 Internet AG
> Brauerstraße 48
> 76135 Karlsruhe
> 
> Amtsgericht Montabaur HRB 6484
> 
> Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Andreas
> Gauger, Matthias Greve, Robert Hoffmann, Norbert Lang, Achim Weiss
> Aufsichtsratsvorsitzender: Michael Scheeren
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> qooxdoo-devel mailing list
> qooxdoo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 
> 

-- 
View this message in context: 
http://www.nabble.com/qx-0.7.2---qx.io.remote.Response%3AgetData-deprecated-tf4482796.html#a12792783
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to