Mal hier zum zeigen wozu ein Class helper gut ist.
Ist kopiert deshalb als Zitat.
Zitat:
Here's an example (no implementations, only class definition / method interface):
Delphi-Quellcode:
TTest = class
procedure SomeProc;
end;
...
TTestHelper = class helper for TTest
function SomeFunc : string;
end;
With the above class definitions, we can use the next code:
Delphi-Quellcode:
var
t:TTest;
begin
t:=TTest.Create;
t.SomeFunc ;
...
even though SomeFunc was
*not* defined in class TTest!