[fpc-pascal] overriden or not ?
Adriaan van Os
adriaan at adriaan.biz
Fri Aug 18 10:49:55 CEST 2023
Bart via fpc-pascal wrote:
> 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
>
Thanks,
Adriiaan van Os
More information about the fpc-pascal
mailing list