This is the link to the old documentation, which has been available for a 
long time but is no longer available

What I like more about the old documentation was there were better examples 
inline with the API code.  The new API, albeit a much better interface, is 
suited more for advanced coders I think.  

Now, having said that, there looks like some additional work has been done 
to these pages:

I have been working on an icon factory helper script, which, given an icon 
image sprite lets you pick an icon and gives you back the correct static 
icon factory get method for use in your code, and well I found the *Measuring 
Elements and Offsets* section very useful!
I think we should focus on expanding these articles and I think the API 
should reference these articles wherever possible.  


On Saturday, December 1, 2012 2:17:24 AM UTC-7, petrob wrote:
> The old documentation must have just been replace by the new one... The 
> bigger problem is that the most recent one is still far the weakest part of 
> the whole project, as it is laconic, incomplete, even faulty in some cases 
> and it does not encourage any deeper understanding of the code base.  Just 
> search for some keywords like 'error tickets / mistakes in the code base / 
> in the documentation', and the like, and you will be quickly up-to date 
> about it, but I will leave it now...
> The need for using the $break object is based on how iteration is handled 
> in Prototype in the 'each' method where any iterator functions are passed 
> on to be called in the _each method in a  try- catch structure. 
> In this way any errors in any bad function calls at any depth are caught 
> by the high level catch branch.. Because the native boiler- plate iteration 
> always only takes place in the high-level scope of the  _each method, you 
> will get an error if you try to call the break command in an embedded 
> method to try to step out of the high-level loop as there is no iteration 
> taking place in that deeper scope, at all. Instead, Prototype throws a 
> special error object to do exactly that.
> In the any method - for instance- 
> /*...cut...*/
>     this.each(function(value, index) {
>       if (result = !!, value, index, this))
>         throw $break;
>     }, this);
> /*...cut..*/
> the $break object is thrown when the iterator function returns a boolean 
> true value for the first element. The loop is broken and the result 
> variable is returned. In the catch branch of each the special $break error 
> object is recognized and evaluated to do nothing then.
> catch (e) {
>       if (e != $break) throw e;
>     }

You received this message because you are subscribed to the Google Groups 
"Prototype &" group.
To view this discussion on the web visit
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to