天天看点

Ext JS 学习笔记

对于scope使用的几个小技巧:

Four Tips for Staying on Track With Scope in ExtJS

如何在ExtJS(Javascript)里面拷贝(克隆)一个Object

对于ExtJS可以使用这段代码:

/**      
* Clone Function      
* @param {Object/Array} o Object or array to clone      
* @return {Object/Array} Deep clone of an object or an array      
* @author Ing. Jozef Sakáloš      
*/      
Ext.ux.util.clone = function(o) {      
if(!o || 'object' !== typeof o) {      
return o;      
}      
if('function' === typeof o.clone) {      
return o.clone();      
}      
var c = '[object Array]' === Object.prototype.toString.call(o) ? [] : {};      
var p, v;      
for(p in o) {      
if(o.hasOwnProperty(p)) {      
v = o[p];      
if(v && 'object' === typeof v) {      
c[p] = Ext.ux.util.clone(v);      
}      
else {      
c[p] = v;      
}      
}      
}      
return c;      
}; // eo function clone       

原始网页:

http://www.extjs.com/forum/showthread.php?t=26644

ExtJS自定义事件冒泡:

参考链接:DOM-like event bubbling on [component].ownerCt 

http://www.extjs.com/forum/showthread.php?t=30569

Ext.ux.BroadcastEvents -application level events (aka broadcasting) v0.5

http://www.extjs.com/forum/showthread.php?t=37422

继续阅读