Sorry, my OO is a bit slow.
I was sorta meaning like this, to take your current example
var Animal = new Class ({
initialize: function () { ... },
say: function () { alert('hi'); }
});
var Cow = new Class({
Extend: Animal,
Include: [Eatable, Breedable],
initialize: ..
say: function () { this.base().say(); alert('meoooou'); }
});
I may be way gone.. but was proposing a name for the super keyword, in my
own unique way...
(i did name that problem with a shakey sortable the jitterbug)
Gareth
On 6/25/07, Tobie Langel <[EMAIL PROTECTED]> wrote:
>
>
> > Is Base an option for the naming of the parent class?
>
> Just to clarify, we're looking for how to name the equivalent of the
> super keyword in Ruby.
>
> (i.e. a reference to the method of the same name in the parent class).
>
> > "initialize" is reserved, why not "extends" too - allowing the "Class"
> > > constructor to automatically extend the new class by just looking at
> > > the content of "extends".
>
> That's an interesting idea, Just rewrote below to better match the
> rest of the syntax. Any pros/cons ?
>
> var Cow = new Class({
> Extend: Animal,
> Include: [Eatable, Breedable],
> initialize: ..
> });
>
>
>
>
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype: Core" 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/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---