PDA

View Full Version : Ext.applyIf recursive



Zdeno
29 Sep 2012, 2:16 PM
I found one discussion without any progress: http://www.sencha.com/forum/showthread.php?13447-Recursive-Ext.applyIf
(http://www.sencha.com/forum/showthread.php?13447-Recursive-Ext.applyIf)
Do you plan add support for recursive applyIf to next version? This is very useful if you need extend Store with proxy.


Ext.applyIf = function(object, config, recursive) {
var property;

if (object) {
for (property in config) {
if (object[property] === undefined) {
object[property] = config[property];
} else if (Ext.isObject(object[property]) && recursive) {
Ext.applyIf(object[property], config[property], recursive);
}
}
}
return object;
}

scottmartin
2 Oct 2012, 8:54 AM
That is an old conversation. I would suggest creating a Feature Request and state your case as much as possible. I will then submit it to dev team as a ticket for review. This will also allow you to track the progress.

Scott.

mitchellsimoens
2 Oct 2012, 9:42 AM
Or just use Ext.merge

Zdeno
2 Oct 2012, 11:32 AM
That is an old conversation. I would suggest creating a Feature Request and state your case as much as possible. I will then submit it to dev team as a ticket for review. This will also allow you to track the progress.

Aye I know, but i didnt find any other thread. Mostly people use Ext.apply/Ext.applyIf in constructor but I didn't find anybody else who use merge or any other function.


Or just use Ext.merge

I totally forgot i can use merge function instead. :">

Cheers guys.