I'm trying to get a callback to work. I have tried the following 3 versions:
//A, doesn't work
obj.RegisterCallback(this.functionX);
//B, still doesn't work
_this=this;
obj.RegisterCallback(_this.functionX);
//C, only this works
_this=this;
obj.RegisterCallback( function(){ _this.functionX(); } );
Only version C works. From searching the internet, I think I understand why A doesn't work, but what's the difference between B and C ?
Thanks in advance.