[fpc-pascal] question with interfaces, hooks

Sven Barth pascaldragon at googlemail.com
Wed Jul 15 15:11:09 CEST 2015


Am 15.07.2015 11:51 schrieb "Graeme Geldenhuys" <
mailinglists at geldenhuys.co.uk>:
>
> On 2015-07-15 10:21, Sven Barth wrote:
> > The property could even be
> > protected or private and it should still work as long as the containing
> > class has the interface in its parent list.
>
> I thought that would only work if you access the method via an interface
> variable, not a class instance variable.
>
> In his sample code fc is a class instance.
>
> I didn't test if his sample code works under Delphi though. Then again,
> if I work with Interfaces, I only ever use an interface reference to
> call methods of that interface.

Ehm yes, as a class instance variable it probably only works using the
property. I'd need to test this in Delphi as well however ;)

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20150715/1a659c52/attachment.html>


More information about the fpc-pascal mailing list