On Mar 15, 10:35 am, Tobie Langel <tobie.lan...@gmail.com> wrote:
[...]
> The difficulty of abstracting your solution comes from the need for
> the bound function to keep a reference to the original length of the
> array so a to reset it before passing it to the original function.
>
> I suspect that the cleanest solution might be to keep a generic array
> updating method and reset the original before calling it.

Isn't that what your "internal" (used with `Function.prototype`
extensions) `update` does?

function update(array, args) {
    var arrayLength = array.length, length = args.length;
    while (length--) array[arrayLength + length] = args[length];
    return array;
  }

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

Reply via email to