msweltzdk
30 Jan 2012, 2:43 AM
I am using Sencha Touch 2.0 PR4
I am trying to add a listener to a button event.
If I add the code like this, everything works fine:
control: {
btnAddParticipant: {
tap: function () {
var participantsStore = Ext.getStore('Participants'),
params = iBygning.app.getController('MainNavigation').getPersist();
Ext.apply(params, participantsStore.getProxy().getParams());
participantsStore.load({
params: params
});
}
}
},
But if I change the code to what looks and feels more right like the following, I get the error written in the subject:
control: {
btnAddParticipant: {
tap: 'loadParticipantsOverlay'
}
},
loadParticipantsOverlay: function () {
var participantsStore = Ext.getStore('Participants'),
params = iBygning.app.getController('MainNavigation').getPersist();
Ext.apply(params, participantsStore.getProxy().getParams());
participantsStore.load({
params: params
});
}
Can someone guide me to what the issue I am having could be?
I am trying to add a listener to a button event.
If I add the code like this, everything works fine:
control: {
btnAddParticipant: {
tap: function () {
var participantsStore = Ext.getStore('Participants'),
params = iBygning.app.getController('MainNavigation').getPersist();
Ext.apply(params, participantsStore.getProxy().getParams());
participantsStore.load({
params: params
});
}
}
},
But if I change the code to what looks and feels more right like the following, I get the error written in the subject:
control: {
btnAddParticipant: {
tap: 'loadParticipantsOverlay'
}
},
loadParticipantsOverlay: function () {
var participantsStore = Ext.getStore('Participants'),
params = iBygning.app.getController('MainNavigation').getPersist();
Ext.apply(params, participantsStore.getProxy().getParams());
participantsStore.load({
params: params
});
}
Can someone guide me to what the issue I am having could be?