Hello List,
one of the advantages of the new property system in qx 0.7 is the
possibility to refine the init attribute, the default value of a property.
In qx.io.remote.Request the properties "method" and "responseType" are
defined as follows:
method :
{
check : [ qx.net.Http.METHOD_GET, qx.net.Http.METHOD_POST,
qx.net.Http.METHOD_PUT, qx.net.Http.METHOD_HEAD,
qx.net.Http.METHOD_DELETE ],
apply : "_applyMethod",
init : qx.net.Http.METHOD_GET
},
responseType :
{
check : [ qx.util.Mime.TEXT, qx.util.Mime.JAVASCRIPT,
qx.util.Mime.JSON, qx.util.Mime.XML, qx.util.Mime.HTML ],
init : qx.util.Mime.TEXT,
apply : "_applyResponseType"
},
The constructor allows to specify this two properties at instantiation:
construct : function(vUrl, vMethod, vResponseType)
If the parameters vMethod and vResponseType are not given I would asume
that the default values of the properties are used, but they are not:
this.setMethod(vMethod || qx.net.Http.METHOD_GET);
this.setResponseType(vResponseType || qx.util.Mime.TEXT);
This is no problem if you use qx.io.remote.Request directly because the
init attribute and the value given to the setMethod and setResponseType
calls
are the same.
But if you derive a class from qx.io.remote.Request and refine the
properties init values this refinement has no effect.
The lines in the constructor of qx.io.remote.Request constructor should be:
if(vMethod)
this.setMethod(vMethod);
if(vResponseType)
this.setResponseType(vResponseType);
I've created a bugzilla entry for that:
http://bugzilla.qooxdoo.org/show_bug.cgi?id=460
Thank you for your help.
Regards.
--
Mit freundlichen Grüßen
Dietrich Streifert
--
Visionet GmbH
Firmensitz: Am Weichselgarten 7, 91058 Erlangen
Registergericht: Handelsregister Fürth, HRB 6573
Geschäftsführer: Stefan Lindner
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel