-
24 Jul 2012 1:02 AM #1
HOW TO Override Ext.app.Controller control() method
HOW TO Override Ext.app.Controller control() method
Hello,
I want to override the control method of the Ext.app.Controller class. Inside the override I want to call the this.callParent(), but this doesn't seem to work. When I execute my code again with the following override, it doesn't listen for the events in this.control():
Am I doing something wrong?Code:Ext.override(Ext.app.Controller,{ control: function() { this.callParent(); } });
I am using Ext JS 4.1.1
-
24 Jul 2012 1:10 AM #2
Fixed it! I just needed to pass the arguments to the callParent method:
Code:Ext.override(Ext.app.Controller,{ control: function() { if ( ! this.blockControl ) { this.blockControl = true; this.callParent(arguments); } } });


Reply With Quote