[fpc-pascal] Calling overriden method using TMethod

Sven Barth pascaldragon at googlemail.com
Thu Jul 30 20:05:42 CEST 2015

Am 30.07.2015 19:00 schrieb "Joao Morais" <l at joaomorais.com.br>:
> tbar2 inherits from tbar1 and 'go' is a virtual method. v1.go calls the
tbar2 implementation as expected but tm(m1)() does call tbar1.go. As
expected. Is there a nice and safe way to use v1 instance's VMT in order to
call the inherited method? In the real scenario I will have only the
pointer of the virtual method and the instance, respectively @tbar1.go and
v1, and no reference to @tbar2.go
But if you have @tbar1.go and v1 you already have everything you need or do
I misunderstand your plan somehow?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20150730/260e1c3e/attachment.html>

More information about the fpc-pascal mailing list