Thanks Max
The implementation if the IF in combo is delegated to a subcomponent and
that has a GUID
but I'm not quite sure which QueryInterface is used as TComponent implements
it
At this point what Aaron said is true - their is little point in using
interfaces with the VCL
Thanks for all the info
Neven
----- Original Message -----
From: Max Nilson <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Wednesday, 24 November 1999 12:11
Subject: RE: [DUG]: Determining if Object Implements an interface
> Neven commented:
>
> > 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!
>
> The internal implementation of the 'as' operator relies on an interface
> having a GUID defined for that interface, whereas the programatic
> assignment simply modifies the VMT pointer to the appropiate interface
> section of itself via compiler magic and assigns that.
>
> If you haven't defined a GUID for your interface then the above behaviour
> will occur. I discovered this the hard way, and thought that you should
> know. If you already have a GUID then something wierd is happening and
> more debugging will be necessary 8-)
>
> Cheers, Max.
>
>
> --------------------------------------------------------------------------
-
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
>
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz