I have been trying to access global value inside one controller, but could not access it. i have been following this How to define global variable in sencha but could not set and access global values.
in Controller
config: {
successMessage:100,
control: {
'submitnewword': {
activate: 'onActivate',
itemtap: 'onItemTap',
ConfirmTestCommand:'Confirm'
},
.......
},
onSearchKeyUp: function(searchField) {
success: function (response) {
this.setSuccessMessage(1);
}
else {
this.setSuccessMessage(0);
}
}
and access it
Confirm: function () {
console.log("Confirm----- Caling on Controller");
var testing=this.getSuccessMessage();
console.log("Confirm----- value--"+testing);
},
I dont know, what is the wrong with my code.
I am getting this on console:
Uncaught TypeError: Object [object global] has no method 'setSuccessMessage'