The docs say a Model has a get method. However, I keep getting an undefined for mine.
Code:
Ext.define('GS.model.ConnectModel', {
extend: 'Ext.data.Model',
config: {
fields: [
{name: 'accessTokenKey', type: 'string'},
{name: 'accessTokenSecret', type: 'string'}
],
proxy: {
type: 'localstorage',
id : 'soundcloud-key'
}
}
});
When I use it:
Code:
var store = Ext.create('Ext.data.Store', {
model: 'GS.model.ConnectModel'
});
console.debug("store: " + store);
console.debug("store.getModel: " + store.getModel);
console.debug("store.load: " + store.load);
var model = store.getModel();
console.debug("model " + model);
console.debug("model.get: " + model.get);
I've tried the variant using the Model manager, instantiating directly, etc... all result in a model that has most of the methods the documentation states, ...but not get.
I used the auto-gen project using the sencha tools so thought "maybe my SDK is just out of date". However, when I delete the whole directory, and replace with the "sencha-touch-2.0.0-commercial", it now complains about:
Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost/gs/GS/proxy/localstorage.js?_dc=1332710717654
Confused...