> > I wasn't being very clear -- sorry.  Those first two examples
> > illustrate what would happen if we implemented *both* the stuff in the
> > events branch as it is now *and* Dan's proposal to bind class methods
> > automatically.
>
> Right! It is exactly where the magic bites.

Heh, maybe your right.  I think, as a JS programmer, that having to
bind functions manually is what you expect to do but as a beginner it
isn't but I suppose there's no point in confusing matters for
experienced JS programmers.  In the example here (where this is
normally the element but if you pass in the a Class instance its bound
to the object) I quite like how it works actually but each to their
own.  I still think it would be nicer if Class.create() actually
created something that acted like a class from a class based language
rather than just being a normal contructor.

On that point about base: base.js doesn't bind methods but it does
wrap every method to allow access to its super classes version of the
method which is going to introduce even more of a performance overhead
but hasn't been a problem in my experience.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to