jep
17 Oct 2012, 11:40 AM
Having just stumbled upon Ext.data.Types (hardly ever used in official Sencha examples), I started trying to use it in a 2.1 RC1 app. Here's my model file:
Ext.define('OHHChart.model.Datapoint', {
extend:'Ext.data.Model',
requires:['Ext.data.Types'],
config:{
fields:[
{ name:'week', type:Ext.data.Types.INT },
{ name:'value', type:Ext.data.Types.FLOAT }
]
}
});
When the app runs, it throws an error on the first first field def saying:
<b>Uncaught TypeError: Cannot read property 'INT' of undefined </b>
If I put a breakpoint, I can tell the Ext.data.Types is completely undefined at that point. In case it mattered, I also tried putting Ext.data.Types in the app.js requires. Still same problem.
What am I missing?
Ext.define('OHHChart.model.Datapoint', {
extend:'Ext.data.Model',
requires:['Ext.data.Types'],
config:{
fields:[
{ name:'week', type:Ext.data.Types.INT },
{ name:'value', type:Ext.data.Types.FLOAT }
]
}
});
When the app runs, it throws an error on the first first field def saying:
<b>Uncaught TypeError: Cannot read property 'INT' of undefined </b>
If I put a breakpoint, I can tell the Ext.data.Types is completely undefined at that point. In case it mattered, I also tried putting Ext.data.Types in the app.js requires. Still same problem.
What am I missing?