Hello,
Is there a way to bind only certain parameters with curry()? Consider
this example:
function myFunction(event, callback)
{
// ...
}
myElement.observe('click', myFunction.curry(myCallback));
Basically, I'm trying to "preconfigure" myFunction with myCallback and
yet still have the event object available when myFunction is actually
executed. The above snippet doesn't do what I want because the event
parameter inside myFunction is myCallback instead of the actual click
event object. Looking at myFunction.curry(myCallback) declaration it
does seem logical that event is bound to myCallback, however, is there
a way to bind only certain parameters without having to start with the
first one?
Regards,
Rytis
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---