Perhaps the problem is that you've already used bindMethods on the Helper class before subclassing? That might break the inheritance depending on how the code looks, since it reassigns the "this" object pointer to another instance.
Also, you must use the "new" keyword, or it won't work: other.prototype = new Helper(); Keeping the scope for DOM events is one of the points with MochiKit.Signal: connect(elem, "onclick", obj, "method"); Or one could use bind when setting each callback. Using bindMethods is also ok, within some constraints. /Per > On Wed, Oct 8, 2008 at 12:56 AM, Akari no ryu <[EMAIL PROTECTED]> wrote: >> >> other.prototype = Helper doesn't help. Since bindMethods has made sure >> that 'this' always refers to the class that it was invoked in, the >> methods loose scope when you use them. >> >> Troels, the problem with using prototypical inheritance is that you >> end up losing scope in, for example, AJAX request responses or DOM >> event handlers. >> >> >> >> > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
