On 12/9/06, Peter Michaux <[EMAIL PROTECTED]> wrote:

> I think el for element, hz for frequency, cb for callback, nv for new
> value, and lv for last value are not extreme abbreviations.

hz cb nv lv? Are you fucking kidding me? We have the year 2006, not
1981 last time I checked!

> less code for the Prototype community to maintain.

This is a maintenance nightmare! And I remember you were all in rage
about Prototype code to be difficult to understand for outsiders and
now you propose a change to hz cb nv lv? We should do this throughout
the whole code, I am sure this will be all appreciated by anyone
browsing the files.

> If I've missed something here then that changes everything.

getValue() is there for a reason. element.value !== lastvalue can not
be used for checkboxes, radio controls and selects.

> However without retaining the value returned by setInterval() I can't
> see that much can be manipulated after the observer starts.
> You could
> play weird tricks like changing the callback function but I doubt
> anyone does that and it wouldn't fall under the 80/20 rule.

How about patching it to save the  interval ID and implement stop()?
If there is not already a patch for this in Trac.

> Note also that in the Prototype code
>
> if (this.lastValue != value) {
>
> should probably be
>
> if (this.lastValue !== value) {
>
> because both 0 and the empty string '' typecast to false and so 0!=''
> returns false.

This is true.

> Note also that a semicolon at the end of this line looks like it would
> make the observer section minimizable

True again, but Thomas is not interested in that thing or in making
the code Mozilla warnings free. The former does not hinder me, as
Dojo's compressor can handle this, and as for the later, this is why I
have my own patched of Prototype and Scriptaculous..

--~--~---------~--~----~------------~-------~--~----~
 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to