Skip to content

Instantly share code, notes, and snippets.

@pguerrant
Created October 25, 2012 17:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pguerrant/3954089 to your computer and use it in GitHub Desktop.
Save pguerrant/3954089 to your computer and use it in GitHub Desktop.
Overriding an override
Ext.define('A', {
foo: function() {
console.log('A Foo');
}
});
Ext.define('B', {
override: 'A',
foo: function() {
console.log('B Foo');
this.callParent();
}
});
Ext.define('C', {
override: 'A',
foo: function() {
console.log('C Foo');
this.callParent();
}
});
a = new A();
a.foo();
@pguerrant
Copy link
Author

outputs:
C Foo
B Foo
A Foo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment