While reading this thread
it leads me to this interesting link(thanks stedi for the finding)
http://www.brockman.se/writing/method-references.html
which is a special form of "partial+bind" that is for event listener
rather than generic function. The difference is that event listener
expect the first argument to be the "event" object that is passed when
the event is triggered. I find it a bit hard to do it using the
existing partial function(if I need to pass additional arguments to
it), The current "bind" function seems to be able to handle event
listener withe form of "func(event)".
Can this form of partial(may be the more generic form of from right to
left instead of the left to right) be added to MochiKit ?
I think this is what I need. The reason why I mentioned right to left
partial is that I just follow the convention of event listener usually
has the first argument as event, having it as the last should serve the
same purpose(passing argument to event listener), just that
newbies(like me) may find it unusual(puzzled) when all google returns
is in the other form.
Will this asEventListener and addEventListener go into the next release
of MochiKit ?
Sorry, misreading, I didn't see the asEventListener call in the
addEventListener function.
Please forget last post.
--
Thomas