On Tue, Feb 1, 2011 at 16:42, T.J. Crowder <t...@crowdersoftware.com> wrote:
>> "$break" has been deprecated? > Yup. >> Where is that documented? > I don't know, I only know because Tobie mentioned it to me once. I'm > sure it's mentioned in a thread here somewhere. I can't find any mention of that. (When things get deprecated, that's usually documented/announced somehow, no?) > You'll note it's disappeared from the documentation. Yup. Confused the hell out of me. $break is still in the source code without any mention of deprecation. >> What are we supposed to use instead? > Enumerable has `all`, which is very like ECMAScript5's `every` in that > it stops when you return `false` out of the callback (but ECMAScript5 > defines that the callback gets all three arguments; I don't think > Enumerable makes that guarantee). Enumerable also has `any` which > (like ECMAScript5's `some`) stops when you return `true` out of the > callback. In both cases, using a return value is probably cleaner and > less resource-intensive than throwing an exception. But if you really > like throwing `$break`, No. It always seemed really strange and unclean to me. So even if it's not deprecated, a cleaner solution is most welcome. > you can define it yourself if/when Prototype > actually drops support for it (1.7 still seems to have it, but I bet > the next major version aligns with ECMAScript5). It's easily done. :-) I'm trying out "all" now. -- Bertilo Wennergren berti...@gmail.com http://bertilow.com -- 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 prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.