On Sep 20, 3:40 am, MM Developer <[EMAIL PROTECTED]> wrote:
> Ok take this function I have. This function is a method to a large
> class I have written in JavaScript. I am using the prototype library
> as a framework. You can see how I've had to cheat and use
>
> classObject = this;
>
> in order to preserve the 'this' scope to my class.

The value of a function's this keyword has nothing to do with scope -
it is set by the call.  The bind function changes the call so that the
object you pass to it is set as the function's this keyword when it is
called.


--
Rob
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to