.bind is available to every function via Function.prototype. Any
situation in which you want 'this' to be specifically set to your
object, bind() it to the function and have a nice day... :D

-E

On 1/12/07, Nicolas Terray <[EMAIL PROTECTED]> wrote:
>
> On 1/12/07, tanguyr <[EMAIL PROTECTED]> wrote:
> > Now (*ahem*) i also noticed that "this." gets hijacked inside
> > iterators (each, find, etc).
>
> ... and also in Event.observe, where you have to bindAsEventListener() :)
>
> Some documentation:
> http://blog.livollmers.net/?p=17
> http://particletree.com/notebook/prototype-and-the-this-keyword/
>
> Yours,
> Nicolas Terray
>
> >
>


-- 
Eric Ryan Harrison

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

Reply via email to