2007/12/21, Bob Ippolito <[EMAIL PROTECTED]>: > > On 12/20/07, Ian Lewis <[EMAIL PROTECTED]> wrote: > > Thanks bob, I guess it's been about 8 years. Good to talk to you again. > > High school feels a lot longer ago than that :)
Indeed. Welcome to JavaScript. I feel a my eyes twitching when I go to sleep. That's pretty much what bind does, but Function.prototype.call and > Function.prototype.apply let you jigger "this" for a given call. > foo.bar(a, b) is the same as foo.bar.apply(foo, [a, b]) or > foo.bar.call(foo, a, b). Thank goodness it's there. > works. It's cute how bind returns a function that calls your function but > > goes out and finds the "this" for you first. Pretty useful hack. > > Well you give it 'this' as the second argument, it doesn't do all that > much magic. Only if you're kind enough to give it. I just happen to be a nice guy. Anywho, thanks for the insight. -- Ian Lewis [EMAIL PROTECTED] http://www.ianlewis.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~----------~----~----~----~------~----~------~--~---