On 4/10/06, Michael Peters <[EMAIL PROTECTED]> wrote:
> change this function to return another function. Something like this:

Yes, this is also what .bind() does to form a closure without having
to change NamedActionResponseHandler

> And then call it like this:
>   onComplete: NamedActionResponseHandler(theElement),

onComplete: NamedActionResponseHandler.bind(this, theElement)

theElement will now be passed as an additional argument to
NamedActionResponseHandler, when it is called via onComplete.

Bye,
  Martin
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to