rem: disconnect: function (src, sig, slot, /* optional */func) { /***  When 'disconnect()' is called, it will disconnect whatever connection was made given the same parameters to 'connect()'. Note that if you want to pass a closure to 'connect()', you'll have to remember it if you want to later 'disconnect()' it.  ***/ if (typeof(src) == 'string') { src = MochiKit.DOM.getElement(src); }  if (typeof(sig) != 'string') { throw new Error("'signal' must be a string"); }  slot = MochiKit.Signal._getSlot(slot, func);  if (src.__signals && src.__signals[sig]) { var signals = src.__signals[sig]; var origlen = signals.length; for (var i = 0; i < signals.length; i++) { var s = signals[i]; if (s[0] === slot[0] && s[1] === slot[1] && s[2] === slot[2]) { signals.splice(i, 1); break; } } }  if (src.addEventListener || src.attachEvent || src.__signals[sig]) {    if (src.__listeners && src.__listeners[sig] && src.__signals[sig].length === 0) {  var listener = src.__listeners[sig];  if (src.addEventListener) { src.removeEventListener(sig.substr(2), listener, false); } else if (src.attachEvent) { src.detachEvent(sig, listener); } else { src.__signals[sig] = undefined; }  var observers = MochiKit.Signal._observers; for (var i = 0; i < observers.length; i++) { var o = observers[i]; if (o[0] === src && o[1] === sig && o[2] === listener) { observers.splice(i, 1); break; } } src.__listeners[sig] = undefined; } } }, 
add: },disconnect:function(src,sig,slot,func){ if(typeof (src)=="string"){ src=MochiKit.DOM.getElement(src); } if(typeof (sig)!="string"){ throw new Error("'signal' must be a string"); } slot=MochiKit.Signal._getSlot(slot,func); if(src._signals&&src._signals[sig]){ var _539=src._signals[sig]; var _540=_539.length; for(var i=0;i<_539.length;i++){ var s=_539[i]; if(s[0]===slot[0]&&s[1]===slot[1]&&s[2]===slot[2]){ _539.splice(i,1); break; } } }else{ throw new Error("Invalid signal to disconnect"); } if(src.addEventListener||src.attachEvent||src._signals[sig]){ if(src._listeners&&src._listeners[sig]&&src._signals[sig].length===0){ var _541=src._listeners[sig]; if(src.addEventListener){ src.removeEventListener(sig.substr(2),_541,false); }else{ if(src.attachEvent){ src.detachEvent(sig,_541); }else{ src._signals[sig]=undefined; } } var _542=MochiKit.Signal._observers; for(var i=0;i<_542.length;i++){ var o=_542[i]; if(o[0]===src&&o[1]===sig&&o[2]===_541){ _542.splice(i,1); break; } } src._listeners[sig]=undefined; } } },signal:function(src,sig){ 
context:     disconnect: function (src, sig, slot, /* optional */func) {        /***        When 'disconnect()' is called, it will disconnect whatever connection        was made given the same parameters to 'connect()'. Note that if you        want to pass a closure to 'connect()', you'll have to remember it if        you want to later 'disconnect()' it.        ***/        if (typeof(src) == 'string') {            src = MochiKit.DOM.getElement(src);        }        if (typeof(sig) != 'string') {            throw new Error("'signal' must be a string");        }        slot = MochiKit.Signal._getSlot(slot, func);        if (src.__signals && src.__signals[sig]) {            var signals = src.__signals[sig];            var origlen = signals.length;            for (var i = 0; i < signals.length; i++) {                var s = signals[i];                if (s[0] === slot[0] && s[1] === slot[1] && s[2] === slot[2]) {                    signals.splice(i, 1);                    break;                }            }        }        if (src.addEventListener || src.attachEvent || src.__signals[sig]) {            // DOM object            // Stop listening if there are no connected slots.            if (src.__listeners && src.__listeners[sig] &&                src.__signals[sig].length === 0) {                var listener = src.__listeners[sig];                if (src.addEventListener) {                    src.removeEventListener(sig.substr(2), listener, false);                } else if (src.attachEvent) {                    src.detachEvent(sig, listener);                } else {                    src.__signals[sig] = undefined;                }                var observers = MochiKit.Signal._observers;                for (var i = 0; i < observers.length; i++) {                    var o = observers[i];                    if (o[0] === src && o[1] === sig && o[2] === listener) {                        observers.splice(i, 1);                        break;                    }                }                src.__listeners[sig] = undefined;            }        }    },
meta: 8607	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8607/ad067b3f5d648d6df90ec6fb2b79f0027612a307/MochiKit.js/buggy/trunk/lib/MochiKit.js