I apologize for bringing up a topic that might have been discussed in the
past, but I wonder if anyone has a definite and clear solution to this
problem:


var A = new Class({
  Implements : Options,

  initialize : function(options) {
      this.setOptions(options);
      if (options && typeOf(options.child) == 'class')
          this.child = new options.child(options);
  }
});

var B = new Class({
      Implements : A,
});

// "Maximum call stack size exceeded"
var instance = new A({child : B});


Also, due to some design considerations, implementing "initialize" in
every subclass is not an option.

Thanks in advance.
-a

Reply via email to