KI-NAM BANG
KI-NAM BANG

Reputation: 295

ExtJS using "new objectname();" vs "Ext.create(...);" --> equal?

ExtJS Library using now. I have a one question.

myClass = {
    myText: Ext.define("myedit", {
        extend: 'Ext.form.field.Text'
    })
};

var A = new myClass.myText();
var B = Ext.create("Ext.form.field.Text");

A & B is same? I want know problem when using like A.

Upvotes: 0

Views: 73

Answers (1)

SW4
SW4

Reputation: 71160

This has been covered in a fairly large amount of detail in the Sencha forums, the short of it is, try to use the create method wherever possible, for by far the majority of cases it will be the recommended course of action.

Upvotes: 1

Related Questions