Hello.
At present, a class can not inherit interfaces implemented by its ancestors. I think that it is not right. To correct the given fact, it is necessary only to add a few lines in the unit ObjPas in a method TObject.GetInterfaceEntry():
class function TObject.getinterfaceentry(const iid : tguid) :
pinterfaceentry;
var
i: integer;
intftable: pinterfacetable;
Res: pinterfaceentry;
begin
getinterfaceentry:=nil;
intftable:=getinterfacetable;
if assigned(intftable) then begin
i:=intftable^.EntryCount;
;
while (i>0) and
not (assigned(Res^.iid) and IsGUIDEqual(Res^.iid^,iid)) do
begin
inc(Res);
dec(i);
end;
if (i>0) then
getinterfaceentry:=Res
{ begin of correction block 1 }
else if ClassParent nil
then getinterfaceentry :=
ClassParent.GetInterfaceEntry (IID)
{ end of correction block 1 }
;
end
{ begin of correction block 2 }
else if ClassParent nil
then getinterfaceentry :=
ClassParent.GetInterfaceEntry (IID)
{ end of correction block 2 }
;
end;----------------
Ivan Shikhalev
