[fpc-pascal] overriden or not ?

Bart bartjunk64 at gmail.com
Fri Aug 18 10:28:05 CEST 2023

On Fri, Aug 18, 2023 at 10:21 AM Adriaan van Os via fpc-pascal
<fpc-pascal at lists.freepascal.org> wrote:
> Is there a way to see if a specific class/object method has been overridden or not ?

There's an example of this in Lazarus Controls unit:

  // Check if SetTextBuf is overridden, otherwise
  // we can call RealSetText directly
  if TMethod(@Self.SetTextBuf).Code = Pointer(@TControl.SetTextBuf)
then //not overridden


More information about the fpc-pascal mailing list