On Jul 11, 11:25 pm, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
> Ha, after all it was a good idea to keep jQuery's discussion list
> archives. I think I found what I was looking for, for anyone else
> interested:http://twologic.com/projects/inheritance/
>
> The API is definitely extremely nice.

"Inheritance.js is a plugin for the Prototype JavaScript"

If you get it rewritten for jQuery (or standalone use), could you
please post it here?

Unrelated side-note: on that page he writes:

"However, the constructor function must be executed in order to create
a prototype object for any child classes. In such cases, the
constructor function is now also acting as a prototype initializer.
This double duty often results in very subtle bugs, that can often be
hard to find."

i found one such bug while writing JS extensions in C++ using
SpiderMonkey: in SpiderMonkey, the native-side prototype object never
gets its ctor called, which means that when implementing the native
destructor (in C/C++) one must often take care not to perform normal
cleanup operations when the prototype object's dtor is run. Weird, but
true: Monkey cannot call a ctor for a prototype because a ctor might
require arguments, and a prototype must be initialized without
arguments.

:)

Reply via email to