How to setup base class so that subclasses don't neet to call $super
in their initialize method (because they might skip this call or call
with wrong parameters) ?
--
You received this message because you are subscribed to the Google Groups
Prototype script.aculo.us group.
To post to this
Have you ever considered not including the initialize method in the
subclass?
Perhaps your baseclass can check if there's a child 'constructor' present
and automatically call that:
var MySuper = Class.create({
initialize: function() {
// do stuff
if (this.childConstructor) {
Thanks, it's usefull !
On 3 янв, 16:34, Johan Arensman johanm...@gmail.com wrote:
Have you ever considered not including the initialize method in the
subclass?
Perhaps your baseclass can check if there's a child 'constructor' present
and automatically call that:
var MySuper =