PDA

View Full Version : Unable to change controller controls with Architect?



mjew
30 Aug 2012, 10:16 AM
I've just started working with Architect and am having an issue getting the controller right. I have a button (btnBack) that I want to run a function (tapBack), but I can't change the control section in the config code to refer to just this button, so all buttons will run the same function. How do I make it different for each button? I think what I want to do is change the "button" part of the control to be "btnBack" from the reference, but I see no way to edit that in Architect.

This is from my controller js:


config: {
refs: {
btnBack: '#btnBack'
},
control: {
"button": {
tap: 'tapBack'
}
}
},
tapBack: function(button, e, options) {
alert('hi');
},