Reputation: 347
Im using Ext.apply(obj1,configobject) in Extjs4; let us consider this sample example :
var obj1 = {},
configobject = {
a: 'value',
d: 'somevalue',
c: {
c1 : 10,
c2 : 5,
c3 : 4
}
};
Ext.apply(obj1, configobject);
obj1.c={c2 : 25}
document.write(obj1.c.c1 + ', ' + obj1.c.c2 + ', ' + obj1.c.c3);
Now the value of obj.c.c1 and obj.c.c3 will show undefined, can anyone tell me the reason
Thanks
Upvotes: 0
Views: 894
Reputation: 510
Ext.apply should work properly. Here is working sample http://jsfiddle.net/mWaZJ/
Upvotes: 1