Leaeaxedx
(Leaeaxedx)
1
I’m familiar with the sintax
method Test; implements AnyInterface.MethodName
but how to do this in reversed way, like
SomeThirdPartyClass = public class
protected
method Test;
end;
MyInterface = interface
method SomeMethod
end;
MyClass = class(SomeClass, MyInterface)
protected
MyInterface.SomeMethod:= Test; // this is the way Delphi does
end;
How to do it when interface and class method names don’t match.
Regards.
ck
(Carlo Kok)
2
Oke so two concepts; you can use implements to implement a specific interface, like:
MyClass = class(MyInterface)
protected
method MyMethod; implements MyInterface.SomeMethod;
end;
However you seem to want to promote a different method; that’s not supported, you’d need to do something like:
SomeThirdPartyClass = public class
protected
method Test;
end;
MyInterface = interface
method SomeMethod;
end;
MyClass = class(SomeClass, MyInterface)
protected
method SomeMethod;
end;
method MyClass.SomeMethod;
begin
Test;
end;
Leaeaxedx
(Leaeaxedx)
3
So i need a method wrapper…
Will Delphi style interface method implementation be supported ever?
Thanks.