hm, zusätzliche Variable InCloning, also so:
Code:
TMyClass = class(TInterfacedObject, IMyInt)
strict private
fA: Boolean;
fB: String;
fChanged: Boolean;
fInCloning: Boolean;
private
procedure SetA(AValue: Boolean);
function GetA: Boolean;
function GetB: String;
public
constructor Create;
destructor Destroy(); override;
function Clone: IMyInt;
function Save: Boolean;
property A: Boolean read GetA write SetA;
property B: String read GetB;
end;
....
procedure TMyClass.SetA(AValue: Boolean);
begin
if fA <> AValue then
begin
if not fInCloning then
fChanged := True;
fA := AValue;
end;
end;
function TMyClass.Clone: IMyInt;
begin
fInCloning := True;
try
<bisheriger Clone-Code>
finally
fInCloning := False;
end;
end;