I have a controller code:
Code:
loadUser: function (form) {
var user = Ext.create("MyApp.model.Account");
user.load({
success: function (record, operation) {
console.log('Success');
},
failure: function (record, operation) {
console.log('Error');
},
callback: function (record, operation, success) {
this.someFunction();
}
});
},
someFunction: function () {
console.log('Some Function.');
},
onRender: function (object, options) {
this.loadUser(object);
},
After that, I bind a onRender function to render event in the view of this controller:
Code:
listeners: {
render: 'onRender'
}
As a result, during startup I see the following error:
Code:
Object doesn't support property or method 'someFunction'
Why can't I call this function? Thank in advance.