Anonymous classes and non-default constructors
807607Oct 16 2006 — edited Oct 16 2006I've got a class with only one constructor and that takes an argument. In another class, I want to have an anonymous class that extends this class with something like:
new MyClassWithoutDefaultConstructor(myConstuctorArg) {...}
However, I get a "The constructor MyClassWithoutDefaultConstructor() is undefined".
As a workaround I can create a local class (not anonymous) that extends MyClassWithoutDefaultConstructor and then includes a default constructor which passes my arg to the super constructor. But this is rather messy.
Am I missing something?