<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 14.11.2020 11:26, Michael Van
Canneyt wrote:<br>
</div>
<blockquote type="cite"
cite="mid:alpine.DEB.2.21.2011141124580.31219@home">
On Sat, 14 Nov 2020, Ondrej Pokorny wrote:
<br>
<blockquote type="cite">Then I saw the next chapter "Overriding
properties". It wrongly described redeclaring of properties as
overriding. I fixed that as well in r1778.
<br>
</blockquote>
<br>
I think the difference is rather artificial, but if you think this
is
better: great.<br>
</blockquote>
<p>You are right. I didn't know one can override also read/write
specifiers (I thought one must redeclare the property in that
case):</p>
<p> TAncestor = class(TComponent)<br>
private<br>
fPropName: string;<br>
published<br>
property PropName: string read fPropName write fPropName;<br>
end;<br>
TOverride = class(TAncestor)<br>
private<br>
fPropName2: string;<br>
published<br>
property PropName read fPropName2 write fPropName2; // no type
declaration<br>
end;<br>
<br>
</p>
<p>But anyway as stated in the Delphi docs
<a class="moz-txt-link-freetext" href="http://docwiki.embarcadero.com/RADStudio/Sydney/en/Properties_(Delphi)#Property_Overrides_and_Redeclarations">http://docwiki.embarcadero.com/RADStudio/Sydney/en/Properties_(Delphi)#Property_Overrides_and_Redeclarations</a>
:<br>
</p>
<p><i>Whether a property is hidden or overridden in a derived class,
property look-up is always static.</i></p>
<p>So you are right - there is no real difference in property
override/reintroduce like there is override/overload/reintroduce
difference in object methods.</p>
<p>I'll make that more clear in FPC docs.</p>
<p>Ondrej<br>
</p>
</body>
</html>