javascript - Sencha Architect create override -


I want to create an override for Ext.MessageBox. I have manually created an override file and pointed to JS resource for it. Now the architect looks at this file as an override but I get an error when calling the override function if I ext. I see the message box object and there is no new function. How can I specify override in architecture? What excautely am I wrong?

/app/overrides/MessageBox.js

  Ext.define ('myapp.override.MessageBox', {override: 'extra messagebox ', Test: function () {alert ("123");}});   

Calling : Ext.MessageBox.test ();

returns : UnkeyType error: There is no method in object [object object] 'test' < / div>

The message box is a singleton, which you can not override in this way.

You can add things like MessageBox to code:

Ext.MessageBox.test = function () {alert ('123'); });

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -