I come from an object oriented world, but I'm trying to make a go of javascript. I've created a class using WinJS.Class.define. One of the methods makes a call to a webservice. I'm using WinJS.xhr to make the call.
In promise returned by the xhr call I'd like to access some member variables of my class. So something like this:
WinJS.xhr({ url: flickrURL }).then(
function (response)
{
var test = this.classMember;
var functionResult = this.someFunction();
},
function (response)
{
....
});
The problem is "this" is not my class but some other object. Is there any way to do this?
Thank you,
Ricky