Question regarding closure / scoping in callback functions
Hi,
please could anyone explain why the variables sUsername, oModel, sPath, that are not in scope of my callback function for the createBindingContext call? I would expect them to be available as closure variables.
Tags:
Sakthivel Elango replied
I guess the variables are available and have seen at times the debugger just doesn't pick the variables in the closure when it isn't used ! Try doing this,
function fnSuccess(oContext){
debugger;
console.log(oModel);
}