Results 1 to 2 of 2

Thread: Problem with Ext.data.Reader sample code

  1. #1
    Ext User mozicodo's Avatar
    Join Date
    Oct 2010
    Location
    Colorado Springs, CO
    Posts
    14

    Default Problem with Ext.data.Reader sample code

    I was having a problem with my Ext.data.Reader so I tried the sample code in the documentation but am getting the following error:

    Uncaught TypeError: Cannot read property 'length' of undefined

  2. #2
    Ext User mozicodo's Avatar
    Join Date
    Oct 2010
    Location
    Colorado Springs, CO
    Posts
    14

    Default

    Ok. I have a little more information on this. I was working with a TreeStore and a NestedList and got the same error. I tried the NestedList page in the demo and it also got the same error.

    The problem is when you have to read the file locally instead of from a webserver you get this error. I moved my code onto a webserver and it ran fine.

    However, I still need to solve this problem as I'm planning on distributing this in a PhoneGap application and would prefer to not have to download the json data. However, I also don't want to load the json data until the user goes to that page in the web app. So I figure that there's two ways around this.

    1) Dynamically load the javascript doing something like:

    Code:
    var fileref = document.createElement('script')
      fileref.setAttribute('type', 'text/javascript)
      fileref.setAttribute('src', 'data.js')
    which might work but is ugly and kind of a hack.

    2) Use some other way to call this I don't know about

    3) It's a bug and needs to be fixed

Similar Threads

  1. sample code for Ext.Ajax.request and ....
    By profunctional in forum Sencha Touch 1.x: Discussion
    Replies: 5
    Last Post: 12 Jul 2010, 6:35 PM
  2. how to setup ext-gwt's sample code?
    By mars in forum Ext GWT: Discussion
    Replies: 1
    Last Post: 13 Nov 2009, 12:56 AM
  3. ComboBox data store reader problem
    By isullivan in forum Ext 2.x: Help & Discussion
    Replies: 6
    Last Post: 19 Feb 2008, 3:47 PM
  4. Replies: 0
    Last Post: 20 Oct 2007, 8:28 PM

Posting Permissions

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