juacala
juacala

Reputation: 2235

how to migrate extjs 3 code to extjs 4 with ext.extend with 3 arguments

I have read through the migration guide, and I understand how to migrate Ext.extend for things like:

namespace.newClass = Ext.extend(Ext.Panel,overrides);

How does one migrate something (which I've done commonly and is found commonly) that looks like:

namespace.newClass = function(arguments){
Do some stuff;
};
Ext.extend(namespace.newClass,Ext.Panel,overrides);

Upvotes: 0

Views: 396

Answers (1)

Evan Trimboli
Evan Trimboli

Reputation: 30082

Something like this:

Ext.define('MyApp.foo.MyClass', {
    extend: 'MyApp.bar.OtherClass',

    constructor: function(){
        // Call parent ctor if required
        this.callParent(arguments);            
    },

    otherMethod: function() {

    }
});

Upvotes: 3

Related Questions