-
26 Aug 2010 4:28 AM #1
Uncaught TypeError (JsonStore)
Uncaught TypeError (JsonStore)
Hi,
I tried to make a JsonStore:
I get the following Errormessage:Code:var patientStore = new Ext.data.JsonStore({ storeId: 'patientStore', model: 'Patient', autoLoad: true, proxy: { type: 'ajax', //after commenting this line the error disappears url: 'patientData3.php', reader: { root: 'results' } } });
"Uncaught TypeError: Cannot read property 'prototype' of undefined (/sencha-touch/ext-touch-debug.js:11799)"
I have no clue, why...
Kai
-
26 Aug 2010 12:15 PM #2
There's no point using a JsonStore, since you already specify the proxy/reader.
Also make sure you're using the latest beta.Code:var patientStore = new Ext.data.Store({ storeId: 'patientStore', model: 'Patient', autoLoad: true, proxy: { type: 'ajax', //after commenting this line the error disappears url: 'patientData3.php', reader: { root: 'results' } } });Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
2 Sep 2010 12:52 AM #3
Hi, thanks, i took your advices, but still getting the same undefined-error.
This is my code now:
the JSON data:Code:var patientStore = new Ext.data.JsonStore({ autoLoad: true, url: 'patientData3.php', root: 'results', fields: [ 'firstName', 'lastName', 'state' ] });
I am using the latest beta.Code:{ "results": [ { "firstName": "Max", "lastName": "Mustermann1", "state": "kritisch" }, { "firstName": "Max", "lastName": "Mustermann2", "state": "kritisch" }, ] }
-
2 Sep 2010 12:55 AM #4
Use the code I specified above.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
2 Sep 2010 1:12 AM #5
works like a charme, thanks for quick an good answer!
Similar Threads
-
typeerror: w.constrain is not a function
By xgeoff in forum Sencha Touch 1.x: DiscussionReplies: 2Last Post: 4 Aug 2010, 9:20 AM -
Newbie.. how to solve "Uncaught TypeError: Object #(an Object) has no method ''
By ericw in forum Ext 3.x: Help & DiscussionReplies: 1Last Post: 18 Jun 2010, 12:54 AM -
[SOLVED] TypeError when updating to 3.1
By PranKe01 in forum Ext 3.x: Help & DiscussionReplies: 1Last Post: 5 Jan 2010, 3:48 AM -
loadexception with JsonStore: TypeError: Record has no properties
By samskeyti in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 7 Apr 2008, 2:59 AM


Reply With Quote