<div dir="ltr"><div class="gmail_default" style="font-family:'courier new',monospace">Hi,</div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">
Is it OK to use "inherited" in any instance method? i.e.</div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">
It is OK to do this:</div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">procedure TChildClass.DoIt;//override</div>
<div class="gmail_default" style="font-family:'courier new',monospace">begin</div><div class="gmail_default" style="font-family:'courier new',monospace"> inherited DoIt;</div><div class="gmail_default" style="font-family:'courier new',monospace">
end;</div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">But is it ok to do this:</div><div class="gmail_default" style="font-family:'courier new',monospace">
<br></div><div class="gmail_default" style="font-family:'courier new',monospace"><div class="gmail_default">procedure TChildClass.SomethinElse;//NOT DoIt</div><div class="gmail_default">begin</div><div class="gmail_default">
inherited DoIt;</div><div class="gmail_default"> //... ...</div><div class="gmail_default">end;</div><div><br></div><div>I tried, it seems ok, but I am not sure, because I had a strange access violation in my code which I cannot reproduce in simplified version of the code, so I suspect this might be an invalid use and "correct by coincidence"?</div>
<div><br></div><div>Thanks!</div><div>Xiangrong</div></div></div>