I'm using Prototype 1.6 RC0.  I don't see that the superclass
constructor is called automatically.  They should always  be called
automatically, and always before the subclass constructor.  Do I have
to invoke the superclass constructor myself?

See the code below:

var Animal = Class.create({
  initialize: function(name) {
    alert('Animal: initialize');
    this.name = name;
  },
});

// subclass that augments a method
var Cat = Class.create(Animal, {
  initialize: function(name) {
    alert('Cat : initialize');
  },
});

var cat = new Cat('test');


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