[DUG] Interfaces

Todd Martin todd.martin.nz at gmail.com
Fri Aug 8 12:21:43 NZST 2008


That is exactly right, but why would you want to, when ISpeakable 
supports makeNoise() anyway?
You can still pass your TPerson object into a method(AObject : 
INoiseable) without problems.

Todd.
> However if I change my TPerson to the following
>   TPerson = class(TInterfacedObject, ISpeakable, INoiseable)
> then all is happy.  I don't quite understand fully why as yet - I 
> guess you can't get an interface pointer to an object unless it 
> explicitly states that it supports that interface.


More information about the Delphi mailing list