天天看點

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

繼續閱讀