Results 1 to 2 of 2

Thread: [CLOSED] 3.1.1 Bug? Undocumented Ext.data.JsonReader dependency

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Jan 2010
    Posts
    20
    Vote Rating
    0
      0  

    Exclamation [CLOSED] 3.1.1 Bug? Undocumented Ext.data.JsonReader dependency

    This bug is only encountered when you've bundled your own distribution (like me), and don't choose to include the pkgs/data-json.js package ... This was the case in my situation, since I'm using XMLReader instead...

    The Ext.data.DataReader.js functionality has an undocumented dependence on the Ext.data.JsonReader class in (at least) the following function:

    Code:
        
    extractData : function(root, returnRecords) {
            // A bit ugly this, too bad the Record's raw data couldn't be saved in a common property named "raw" or something.
            var rawName = (this instanceof Ext.data.JsonReader) ? 'json' : 'node';
    If you don't have the pkgs/data-json.js package defined, you'll crap out when defining the rawName variable, and it results in the operation failing silently (even with exception listeners)... making it a bit painful to find out what went wrong...

    Short term workaround is to include the package even if you don't need it... Long term is probably to fix the code that has already been labeled as "ugly".

  2. #2
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    19
      0  

    Default

    The data package is scheduled for a major refactor to clean all of this up. In the meantime we'll need to update the documentation to reflect the dependency.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •