netnutmike
26 Sep 2012, 8:42 AM
Hi all,
I made what should be one simple change to a model and since I made the change I keep getting an error that says TypeError: c is not a constructor. It is not happening in the model or store but at seemingly random places in other code.
I can only assume I made some type of punctuation problem but I cannot find it and it is really short. Below is the both the model and store code. Can anyone see what I am doing wrong. This was working prior to me adding the new field to the model.
Thank You!
Mike
Model:
Ext.define('MyApp.model.MissingComponents', {
extend: 'Ext.data.Model',
fields: [
{
name: 'Date'
},
{
name: 'MissingAv',
type: 'int'
},
{
name: 'MissingBigfix',
type: 'int'
}
]
});
Store:
Ext.define('MyApp.store.MissingComponents', {
extend: 'Ext.data.Store',
requires: [
'MyApp.model.MissingComponents'
],
constructor: function(cfg) {
var me = this;
cfg = cfg || {};
me.callParent([Ext.apply({
autoLoad: true,
model: 'MyApp.model.MissingComponents',
proxy: {
type: 'ajax',
extraParams: { dataset: 'missingcomponents', days:'14' },
url: '/data/getjson.php',
timeout: 60000,
reader: {
type: 'json',
root: 'components'
}
}
}, cfg)]);
}
});
I made what should be one simple change to a model and since I made the change I keep getting an error that says TypeError: c is not a constructor. It is not happening in the model or store but at seemingly random places in other code.
I can only assume I made some type of punctuation problem but I cannot find it and it is really short. Below is the both the model and store code. Can anyone see what I am doing wrong. This was working prior to me adding the new field to the model.
Thank You!
Mike
Model:
Ext.define('MyApp.model.MissingComponents', {
extend: 'Ext.data.Model',
fields: [
{
name: 'Date'
},
{
name: 'MissingAv',
type: 'int'
},
{
name: 'MissingBigfix',
type: 'int'
}
]
});
Store:
Ext.define('MyApp.store.MissingComponents', {
extend: 'Ext.data.Store',
requires: [
'MyApp.model.MissingComponents'
],
constructor: function(cfg) {
var me = this;
cfg = cfg || {};
me.callParent([Ext.apply({
autoLoad: true,
model: 'MyApp.model.MissingComponents',
proxy: {
type: 'ajax',
extraParams: { dataset: 'missingcomponents', days:'14' },
url: '/data/getjson.php',
timeout: 60000,
reader: {
type: 'json',
root: 'components'
}
}
}, cfg)]);
}
});