If you try to extend Object with ExtJS and add some properties to the new class:
1 MyClass = Ext.extend(Object, {
2 p: 1
3 }
When you will create a new instance of this class, you loose all your properties previously added.
1 var obj = new MyClass ();
2 console.log(obj.p); // will be 'undefined'
This is the issue:
1 MyClass = Ext.extend(Object, {
2 constructor : function(options){
3 Ext.apply(this, options || {} );
4 },
5 p: 1
6 });
And to extend again:
No comments:
Post a Comment