PDA

View Full Version : [1.0.1a/1.1b2] Ext.util.MixedCollection - bug in addAll() method



mystix
2 Jul 2007, 7:21 PM
i know this was reported somewhere before but i couldn't find the thread:
Ext.override(Ext.util.MixedCollection, { // @1.0.1a / 1.1b2 temp fix
addAll : function(objs) {
if (arguments.length > 1 || objs instanceof Array) {
var args = arguments.length > 1 ? arguments : objs;
for (var i = 0, len = args.length; i < len; i++) {
this.add(args[i]);
}
} else {
for (var key in objs){
if (this.allowFunctions || typeof objs[key] != "function") {
// this.add(objs[key], key); // <== bug
this.add(key, objs[key]); // <== fix
}
}
}
}
});

jack.slocum
2 Jul 2007, 8:24 PM
Thanks. I have updated both branches.