Wow. Please forgive my misstep. No insult intended--while you may be extremely competent in the use of closures, scoping, etc., understand that such foundational knowledge is uncommon in those requesting help on this list.
However, it seems the intent of your request could be handled through the use of bind(). Understanding of bind has been, in my experience, less common than understanding of closures. If what you're asking for is not possible with bind(), I wonder whether applying the scoping you're requesting is possible. In this I defer to some of the more experienced voices here--and Tobie has already suggested it's not possible. TAG On Jun 7, 2007, at 1:27 PM, Omega wrote: > > I know how javascript scope works, I don't need to be "educated" on > it. I work with closures every day of my life, so I'm probably well > capable of discussing the subject. > > The fact of the matter is that prototype hijacks the scope and I don't > know where it goes. > > I think the only thing that can really be done is to just offer the > option to disable automatic JS parsing, and do an eval() myself in the > scope I'd like. > (as eval() normally exists in the scope in which it is called....) > > > - Omega > > On Jun 6, 8:32 pm, Tom Gregory <[EMAIL PROTECTED]> wrote: >> I saw Tobie's comments on the ticket. It looks like you may want to >> study a bit of how Javascript handles scoping. >> >> You may also find it useful to study Prototype's bind() function. >> >> http://prototypejs.org/api/function >> >> TAG >> >> On Jun 6, 2007, at 2:50 PM, Omega wrote: >> >> >> >>> I've created a ticket for this... Take a look at the example I >>> included, it makes everything fairly clear. >> >>> http://dev.rubyonrails.org/ticket/8595 >> >>> - Omega > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
