[Lazarus] Different "default" value for a property in derivedclass

Graeme Geldenhuys graeme at geldenhuys.co.uk
Sun Apr 7 02:13:06 CEST 2013


On 2013-04-06 18:19, Jether (yahoo) wrote:
> This doesn't make any sense to me, TB is descendent of TA, TB should never 
> affect the behavior of it's ancestror TA.

TB doesn't affect the behaviour of TA. TB extends or descends from TA,
altering its own behaviour. That is the purpose of descendants - add or
change functionality. Because TB changed the default value in the
constructor, it should also notify the RTTI system about that change,
hence the redeclared property with a new 'default stB' text.



Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/





More information about the Lazarus mailing list