A few MochiKit questions I couldn't find the answer for elsewhere:

#1. Is there a way to do "late" binding with MochiKit.Base.bind? I.e.
allowing function names to be resolved when the returned function is
called, rather than when bind() is called. See example below:

obj = {
    a: function() { return "a"; },
}
var test = MochiKit.Base.bind("a", obj);
test() ==> "a"
obj.a = function() { return "b"; }
test() ==> "b" (currently MochiKit returns "a" here)

It is easy enough to modify the MochiKit.Base.bind(), but it would of
course break semantic backwards compability a bit.

#2. The MochiKit signal/slot mechanism requires signal() to be called
for non-DOM events. But it would also be possible to create a
mechanism that instead replaced the source function with a dispatcher
function (which I think is the dojo-way to do this). If implemented
like that, it is possible to connect to any function in any object
without that function being explicitly declared a signal.

Is there any reason for the MochiKit approach here, or is it just that
the design above wasn't considered?

#3. With a few quick hacks to set class and function names on object
functions I've been able to implement JavaScript stack traces. And
combined with logging, this has proven extremely powerful for
debugging issues in the application.

Is there something for stacktraces already in MochiKit? Would it be
welcomed as a patch?

I have a few other questions, but I'll save the rest for another
day...

Cheers,

/Per

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