Know what? I'm glad to say that after reading through the links, I think
I am already pretty much up to speed on most things discussed. Some of
the fancier construction techniques, those trying to address multiple
inheritance were advanced. But I'm familiar with prototype object
construction and standard js inheritance. I did very much enjoy the
"this" testing Bob as it gave nice clear examples of what I've experienced.

So maybe my problem actually is not so serious and is more related to
the Mochikit AJAX method I am using. So, please indulge my real world
hang up...

What prompted my post was trouble with trying to pass a method of an
object instance to addCallback() of doSimpleXMLHttpRequest("pathtoxml")
-- and "this" returning [object Window] instead of the reference to the
instance.

In other words, assume:
function ClassA(){ this.xml; }
ClassA.prototype.cleanXML = function(rslt){ this.xml = rslt...; };
MyA = new ClassA();

I then tried:
doSimpleXMLHttpRequest("pathtoxml").addCallback( MyA.cleanXML );

The "this" inside MyA.cleanXML in this case points to window, because I
guess what is going on is the method is being copied. So is there a way
to do this staying inside my object? So I don't have to have a external
function that then populates MyA.xml?

Thanks again!!


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to