> > when 'as' is used with an Interface identifier as the RHS the LHS must
> > implement QueryInterface which comes from IUnknown.
> Funny thing is Aaron that Combo does implememt IUnknown (as it implements
> IanInterface)
> so
>
> var
> interface: IanInterface;
>
> IanInterface := Combo;
>
> compiles OK but 'as' doesn't!
What is the Declaration of Combo... Is it TObject or similar or is it a type which
is (direct or derived from) using an interface...
Eg
TMyINterfacedObject = class(TInterfacedObject,ISpam)
end;
If I pass an instance of this through a procedure
procedure Blah(Combo :TObject);
the as won't work since the compiler sees the declaration of Combo as TObject which
does not
use interfaces at all).
BTW if you think this is nasty wait until you attempt to use interface delegation... I
strongly
suggest you read the www.esperanto.org.nz explaining issues in delphi (interface
delegation
is discussed and a solution for non-retrievable parent interfaces proposed).
--
Aaron Scott-Boddendijk
Jump Productions
(07) 838-3371 Voice
(07) 838-3372 Fax
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz