diff -r c4a36ea700d4 -r a8192c57c87d src/js/utils.js --- a/src/js/utils.js Thu Oct 13 17:10:35 2011 +0200 +++ b/src/js/utils.js Thu Oct 13 17:11:20 2011 +0200 @@ -4,13 +4,25 @@ IriSP.traceNum = 0; IriSP.trace = function( msg, value ) { - +/* if( IriSP.config.gui.debug === true ) { IriSP.traceNum += 1; IriSP.jQuery( "
"+IriSP.traceNum+" - "+msg+" : "+value+"
" ).appendTo( "#Ldt-output" ); } +*/ }; +/* used in callbacks - because in callbacks we lose "this", + we need to have a special function which wraps "this" in + a closure. This way, the +*/ +IriSP.wrap = function (obj, fn) { + return function() { + args = [].slice.call(this, arguments); + fn.call(obj, args); + } +} + /* for ie compatibility if (Object.prototype.__defineGetter__&&!Object.defineProperty) { Object.defineProperty=function(obj,prop,desc) {