Yeah, using the call() method is where I went. Before I posted this topic I didn't know about the call() method but I read about it this afternoon and it seems to be my best option.
Thanks, - Dash - Christophe Porteneuve wrote: > Hey David, > > bind *returns* a wrapped version of your original function: binding is > not a property of a function, it's something that is determined at > calling time. > > You can either bind all responders at initialization, or just call them > with the proper binding each time. > > Early binding: > > for(responder in this.responders) > this.responders[responder] = this.responders[responder].bind(this); > > On-the-fly bound calling, example for beforeLoad: > > if (this.responders.beforeLoad) > this.responders.beforeLoad.call(this, arg1, arg2...); > > 'HTH > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
