For what it's worth, I've had a lot less trouble from a cross-browser
perspective subclassing QxXmlHttpLoader such that the xml post-processing is
not performed. When the communication completes, the response data is
dispatched in string form via a QxDataEvent.
Perhaps it might make sense to split the class into a requestor and a response
processor?
--Fred
On Thursday 22 December 2005 11:19 am, Dietrich Streifert wrote:
> Hello Stanislav,
>
> I think for both it would be be better to have properties instead of
> parameters to the load function:
>
>
> QxXmlHttpLoader.addProperty({ name : "async", type :
> QxConst.TYPEOF_BOOLEAN, defaultValue : true });
> QxXmlHttpLoader.addProperty({ name : "raw", type :
> QxConst.TYPEOF_BOOLEAN, defaultValue : false });
>
> an then use:
>
> var loader = new QxXmlHttpLoader();
> loader.setAsync(false);
> loader.setRaw(true);
>
> if you're not setting the async and raw properties the default to the
> definition of the addProperty method above.
>
>
> In the QxXmlHttpLoader class code you can use:
>
> var async = this.getAsync();
> var raw = this.getRaw();
>
> So the load method can be left untouched.
>
> Especially having the parameter async defaulting to true if it is not
> set is a little bit inconsistent.
>
> And yes! I've done the "strange" code. ;-) Shame on me.
>
> The line should simple be:
>
> return this.req.send(data);
>
>
> Regards....
>
> Stanislav Ievlev schrieb:
> >Greetings!
> >
> >As I understand, xmlHttpRequest in renderer branch supports both "POST"
> > and "GET". but it still haven't some features I use in stable branch: 1.
> > ability to send any data, not just url-encoded strings.
> >2. ability to made sync request, not async only.
> >
> >I'm sending a patch for renderer for this features.
> >This version is compatible with previous behavior.
> >
> >P.S. There are also strange code here:
> > return QxXmlHttpLoader._activex ? this.req.send(data) :
> > this.req.send(data);
> >
> > alternatives are equal ;)
> >
> >---
> >With best regards
> >Stanislav Ievlev.
> >
> >
> >
> >------------------------------------------------------------------------
> >
> >--- QxXmlHttpLoader.js.orig 2005-12-22 17:44:38 +0300
> >+++ QxXmlHttpLoader.js 2005-12-22 18:40:16 +0300
> >@@ -186,8 +186,12 @@
> >
> > };
> >
> >-proto.load = function(url)
> >+proto.load = function(url,raw,async)
> > {
> >+ if (typeof async == "undefined") {
> >+ async = true;
> >+ };
> >+
> > try
> > {
> > this.req = QxXmlHttpLoader._activex ? new
> > ActiveXObject(QxXmlHttpLoader._activexobj + ".XMLHTTP") : new
> > XMLHttpRequest(); @@ -217,7 +221,7 @@
> > if ( method == "GET" )
> > url = this._applyRequestProperties(url);
> >
> >- this.req.open(method, url, true);
> >+ this.req.open(method, url, async);
> >
> > // apply request headers to the request object
> > //
> >@@ -228,7 +232,10 @@
> > // method
> > var data = null;
> > if ( method == "POST" )
> >- data = this._applyRequestProperties();
> >+ {
> >+
> >+ data = (typeof raw ==
> > "undefined")?this._applyRequestProperties():raw; + }
> >
> > return QxXmlHttpLoader._activex ? this.req.send(data) :
> > this.req.send(data); }
--
==========================================================
Fred R. McDavid, III
540-248-0838
[EMAIL PROTECTED]
BitDaddy Systems, Inc
* Complex System Design, Management, and Hosting
==========================================================
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel