javascript - Extjs Override makeButton -


i have problem ext js 4.2.1. want override makebutton function in ext.window.messagebox. code:

ext.override(ext.window.messagebox,{                             makebutton: function(btnidx) {                     var btnid = this.buttonids[btnidx];                     var buttonicons = {                         ok: 'iewp-icon-ok',                         yes: 'iewp-icon-ok',                         no: 'iewp-icon-cancel',                         cancel: 'iewp-icon-cancel'                       };                     return new ext.button.button(                     {                         handler : this.btncallback,                         itemid : btnid,                         iconcls: buttonicons[btnid],                         scope : this,                         text : this.buttontext[btnid],                         minwidth : 75                     });                 }             }); 

ext.override called in init function of application , works @ point other overrides.

the change works, if change function directly in ext-all-dev file line 127299, not override.

does know why?


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -