On Thu, Dec 22, 2005 at 05:38:20PM +0100, Sebastian Werner wrote:
> I like the properties better, too. If there would be a patch with this I 
> will apply it.
OK, I will try it.
> 
> Sebastian
> 
> 
> 
> Dietrich Streifert schrieb:
> >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);
> >>   }
> >>  
> >
> >-- 
> >Mit freundlichen Gr??en
> >Dietrich Streifert
> >Visionet GmbH
> >
> 
> 
> 
> -------------------------------------------------------
> 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


-------------------------------------------------------
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

Reply via email to