在我看来,我有这个定义:
看法:
Ext.define("MyApp.view.Welcome", {
extend: 'Ext.Panel',
alias: 'widget.welcomeview',
config: {
///...items... removed lines for brevity..
{
xtype: 'button',
id : 'btnSignInNow',
text: 'Sign In Now',
listeners: {
tap: function() {
this.fireEvent("onSignInNowTap", this);
console.log("onSignInNowTap fired"); /// <-- I see this in console.log
}
}
}
我可以在日志中看到这一点。但在我的控制器中,它没有收到事件。任何人都可以对此有所了解吗?
控制器:
config: {
refs: {
welcomeView: 'welcomeview'
},
control: {
welcomeView: {
onSignInNowTap: function () {
alert('bla!'); <!-- I Don't see this in console.log
}
}
}
}
我很感激我可能错过了一些东西,但是有什么方法可以调试来找出这个事件是如何/在哪里丢失或被忽略的?