From: Joao M. <jcm...@us...> - 2005-07-13 00:40:09
|
Update of /cvsroot/instantobjects/Source/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19034/Core Modified Files: InstantPersistence.pas Log Message: IsDefault property was rewriten to ensure that none or only one connector is the Default Connector in design time. InstantLogStatement procedure was placed inside compiler diretives to avoid compilation warning. Retouchs inside UpdateExternalPartsMap to avoid unnecessary calls to Items of PartsAttribute. Index: InstantPersistence.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Core/InstantPersistence.pas,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** InstantPersistence.pas 4 Jul 2005 11:33:21 -0000 1.44 --- InstantPersistence.pas 13 Jul 2005 00:39:57 -0000 1.45 *************** *** 1390,1394 **** FClientList: TList; FObjectStores: TInstantObjectStores; - FIsDefault: Boolean; FTransactionLevel: Integer; FTransactedObjectList: TList; --- 1390,1393 ---- *************** *** 2633,2636 **** --- 2632,2636 ---- { Local Routines } + {$IFDEF IO_STATEMENT_LOGGING} procedure InstantLogStatement(const Caption, AStatement: string; AParams: TParams = nil); var *************** *** 2649,2656 **** {$IFDEF MSWINDOWS} OutputDebugString(PChar(S)); ! {$ENDIF} if Assigned(InstantLogProc) then InstantLogProc(S); end; function ValidateChars(Buffer: PChar; BufferLength: Integer; --- 2649,2657 ---- {$IFDEF MSWINDOWS} OutputDebugString(PChar(S)); ! {$ENDIF} if Assigned(InstantLogProc) then InstantLogProc(S); end; + {$ENDIF} function ValidateChars(Buffer: PChar; BufferLength: Integer; *************** *** 9081,9088 **** function TInstantConnector.GetIsDefault: Boolean; begin ! if csDesigning in ComponentState then ! Result := FIsDefault ! else ! Result := Self = DefaultConnector; end; --- 9082,9086 ---- function TInstantConnector.GetIsDefault: Boolean; begin ! Result := Self = DefaultConnector; end; *************** *** 9236,9242 **** procedure TInstantConnector.SetIsDefault(const Value: Boolean); begin ! if csDesigning in ComponentState then ! FIsDefault := Value ! else if Value <> IsDefault then if Value then DefaultConnector := Self --- 9234,9238 ---- procedure TInstantConnector.SetIsDefault(const Value: Boolean); begin ! if Value <> IsDefault then if Value then DefaultConnector := Self *************** *** 13979,13988 **** if PartsAttribute.IsChanged then begin - // Make sure that all the items are in memory because they will be - // accessed later, after the database records have been deleted. - for ii := 0 to Pred(PartsAttribute.Count) do - PartsAttribute.Items[ii]; if Map[i].StorageKind = skExternal then begin // Delete all objects SelectParams := TParams.Create; --- 13975,13984 ---- if PartsAttribute.IsChanged then begin if Map[i].StorageKind = skExternal then begin + // Make sure that all the items are in memory because they will be + // accessed later, after the database records have been deleted. + for ii := 0 to Pred(PartsAttribute.Count) do + PartsAttribute.Items[ii]; // Delete all objects SelectParams := TParams.Create; |