Thank you Derrell for your quick response,

Ok I understand your point. I've looked into the qooxdoo implementations and I 
found this here in qx.bom.request.Jsonp:


callback: function(data) {
      if (this.__disposed) {
        return;
      }

      // Signal callback was called
      this.__callbackCalled = true;

      // Sanitize and parse
      if (qx.core.Environment.get("qx.debug")) {
        data = qx.lang.Json.stringify(data);
        data = qx.lang.Json.parse(data);
      }

      // Set response
      this.responseJson = data;

      // Delete global reference to this
      this.constructor[this.__id] = undefined;

      this.__deleteCustomCallback();
    },

The lines above, inside the second if statement are causing my problem.
Before the mentioned if, the data object is fine and includes Date objects, but 
the debug code is "sanitizing" the date object in the map back to a string 
literal.

This seems to be a bug, because it does not behave in debug mode equally to non 
debug mode.

From my understanding the following is happening:

1. Request is send
2. Server answers with a jsonp response e.g. somecallback({ ... myproperty : 
new Date ...});
3. This is parsed and executed by the script element, therefor Date object 
should be present. The qooxdoo callback method converts the date object back to 
a string only in debug mode.

This seems to be a bug for me. 
If the behaviour is to have a json object with date literals, then this does 
only work in debug mode.
If not, if the content of the callback should be used as it is given by the 
script element, then this sanitizing is a bug that only affects in debug mode.

So this seems to be in either case a bug, is my conclusion right or do I miss 
other side effects?

Also another possible bug is present, I have noticed, that the above callback 
is called exactly 10 times, called from a remote table model.
Need also to figure out what is happening, seems not to be in my code... will 
come back soon with this.

Kind regards
--
Sergio  






------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to