I can not access the function inside a controller from my view. It seems I'm missing something but I do not know if I can access it using the non-convergent path, but this does not allow me to get compatible code in future. It may be that some people understand this error and understand why this is going wrong.
Thanks for watching my code.
Ext.define ('imp.view.Test', {extension: 'extension.panel', surname: "widget test.", Xtype: 'test', controller: 'imp. Controller: {title: 'test', scrollable: empty, item: [{xtype: 'button:' .com.util.Utility ',' imp.util.Utility ',' imp. ', ItemId:' postButton ', UI:' action ', padding:' 10px ', text:' post '}]}});
Controller:
Ext.define ('imp.controller.Test', {extension: 'Ext.app.Controller', config: {refs : {TestView: 'test'}, Control: {'test #postbutton': {tap: 'onPostCommand'}}}, toppostname: function () {console.log ('klik');}});
I think there are many ways to do this: I always have my controllers in such a way Write:
Ext.define ('imp.controller.login', {extension: 'ext.app.Controller', init: function () {this.control ({'Button [ Action = test_command] ': {click: this.test_cmd},});}, test_cmd: function () {console.log ("pressed the test command!");}});
With this strategy, your button will require action
: "test_command"
and you You can delete the button and the listener's declaration ID. I'm not sure what the onTestButtonTap function should do at the bottom of your scene file. Did you mean to do two different things?
No comments:
Post a Comment