Is it intentional that the callLater() function causes the 'this' reference
to get scrapped?

Say I run the following. It should call the __repr__ function for my object
that I created but it I suppose the function gets moved to another object
during the callLater call. See http://www.ianlewis.org/dump/test.html for a
running example.

test = new Object();
test.__repr__ = function() {
    return "This is my repr.";
}

test.myfunc = function() {
    logDebug(repr(this));
}

test.init = function() {
  createLoggingPane(true);
  callLater(3.0, test.myfunc);
}

addLoadEvent(test.init);

-- 
Ian Lewis
[EMAIL PROTECTED]
http://www.ianlewis.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to mochikit@googlegroups.com
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