How to use up() in Ext.Button handler

拜拜、爱过 提交于 2019-12-06 12:25:24

First, up is a function so you need to call it this way :

this.up();

Then this.up() would only bring to the container of the button, which has no method onNewButtonTap. You could just keep doing up() until you get the right component but this would me more clever to do :

  • Add an xtype to your view
  • Use this xtype as a selector in the up function : this.up('myXType').onNewButtonTap();

Example

Hope this helps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!