On 23/08/2011 23:23, Simon Nash wrote:
This sounds like the right approach. One small point is that the description
talks about redeclaring fields and methods in the subclass. This is possible
with methods, but it doesn't work for fields as this results in a separate field
with the same name in the subclass which hides the superclass field. To expose
a superclass field as a property in the subclass, the subclass would need to
declare a subclass setter method that assigns to the superclass field.

Simon

Yes, agreed.

This all makes subclassing more work, of course, but I see no alternative if the subclass is going to be in control.


Yours,  Mike.


Reply via email to