Update of /cvsroot/instantobjects/Source/Core
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3107
Modified Files:
InstantPersistence.pas
Log Message:
Revise code for InstantElement.DetachObject.
Index: InstantPersistence.pas
===================================================================
RCS file: /cvsroot/instantobjects/Source/Core/InstantPersistence.pas,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** InstantPersistence.pas 13 Jul 2005 09:49:12 -0000 1.46
--- InstantPersistence.pas 14 Jul 2005 07:38:35 -0000 1.47
***************
*** 5894,5903 ****
function TInstantElement.DetachObject(AObject: TInstantObject): Boolean;
begin
! if Value = AObject then
! begin
Value := nil;
- Result := True;
- end else
- Result := False;
end;
--- 5894,5900 ----
function TInstantElement.DetachObject(AObject: TInstantObject): Boolean;
begin
! Result := Value = AObject;
! if Result then
Value := nil;
end;
|