dimanche 22 juin 2014

Controller setter methods are not being created

I have a super simple controller:

Code:



Ext.define('ScoreKeeper.controller.GameScores', {
extend: 'Ext.app.Controller',

config: {
refs: {
requestButton: 'button[name=RequestButton]',
responseArea: '#scoreResponse'
},
control: {
requestButton: {
tap: 'sendRequest'
}
}
},
sendRequest: function (){
Ext.Ajax.request({
url: 'message',
method: 'GET',
disableCaching: false,
scope: this,
callback: function(options, success, response) {
this.setResponse(response.responseText);
}
});
},
setResponse: function (responseText){
this.setResponseArea(responseText);
}

});

When I tap my requestButton the sendRequest method fires correctly but when it gets to the setResponse method, it fails on the this.setResponseArea step.


When I checked my browser dev tools, it looks like the getter methods for both of my refs get created, but neither of the setter methods do.


What would keep these methods from being created?





Aucun commentaire:

Enregistrer un commentaire