Hi there,
let's say i have this:
AClass = function(){
var data = null;
};
AClass.prototype.makeRequest=function(){
var toGetData = loadJSONDoc('/req.spy?what=where&why=when');
toGetData.addCallBacks(this.saveData, this.failedLoad);
};
AClass.prototype.saveData=function(data){
this.data = data;
};
AClass.prototype.failedReq = function(){
logFatal('Requesting Data has failed');
};
//now when we create the object and run the request.
var someObj = new AClass;
someObj.makeRequest();
if you look at the data variable of the class after everything is
done(after the retrival of JSON) why won't the this.data = data; in
saveData() save to this.data, when i look at this.data it is still
null.
can someone help me plese?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/mochikit
-~----------~----~----~----~------~----~------~--~---