Buy him a beer instead; this solution is a lot better than mine in this
case.

On Tue, May 27, 2008 at 1:04 PM, Ryan Gahl <[EMAIL PROTECTED]> wrote:

> Another way to do this could be to just use proto's .bind(), assuming the
> "myRecursiveFunction" is only ever called as an instance method (vs. calling
> it statically against the MyNS.Package's prototype)...
>
> So:
>
> SomeComplexDataStructure.DataPart.each( function(DataPart) {
> *this.myRecursiveFunction(DataPart);* // or whatever the args should be
> }.bind(this) );


-- 
Science answers questions; philosophy questions answers.

--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-spinoffs@googlegroups.com
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