PDA

View Full Version : Dynamic overriding in ExtJS 3



DrunkenBeard
25 Jun 2011, 11:24 PM
Hi,

Is there a way to pass an object literal as the second argument to override ?


var myCoolOverride = { //cool method definitions }
Ext.override(MyCoolClass, myCoolOverride);

I tried this but it doesn't seem to be working.

mankz
26 Jun 2011, 5:02 AM
Second arg should be an object. What does your code/override look like?

DrunkenBeard
26 Jun 2011, 5:21 AM
Oh my bad, I managed to make it work and forgot to update the thread. It's actually working as intended, I has some scope problems :)