This doesn't work.  When the callback, dataReciever, is called it
doesn't know what 'this' is any more.
I want dataReciever to update the object and then call
this.showRecord.

SBP.prototype.dataReceiver = function(data) {
    // data is an array of (id,text) things
    alert(this.divID + ' dr')                                 // here,
this.divD is undefined
    this.data=data;
    this.idx = 0;
    this.showRecord(idx);
};

SBP.prototype.refreshRecords = function (){
    epReq=loadJSONDoc(this.refreshJSON);
    epReq.addCallbacks(this.dataReceiver,alertFailed);
    alert(this.divID)                                         //
this.divD here is correct
};

Does anybody care to point out the problems in the design?

(MochiKit 1.3.1)

Rgds,
Kael


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to