From 8ec5b0aee644b30e761bb7ec25d0c4b20362ad29 Mon Sep 17 00:00:00 2001 From: mattias Date: Tue, 16 May 2006 13:08:41 +0000 Subject: [PATCH] designer rename component: ifdefed workaround, added rtl include path rtl/srcos2/targetcpu git-svn-id: trunk@9286 - --- components/codetools/definetemplates.pas | 6 ++++-- designer/designer.pp | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/components/codetools/definetemplates.pas b/components/codetools/definetemplates.pas index 4463a960f7..7871a3598f 100644 --- a/components/codetools/definetemplates.pas +++ b/components/codetools/definetemplates.pas @@ -3384,8 +3384,10 @@ begin +';'+Dir+'rtl'+DS+SrcOS+DS; if (TargetOS<>SrcOS) then s:=s+';'+Dir+'rtl'+DS+TargetOS+DS; - if (SrcOS2<>'') and (SrcOS2<>SrcOS) then - s:=s+';'+Dir+'rtl'+DS+SrcOS2+DS; + if (SrcOS2<>'') and (SrcOS2<>SrcOS) then begin + s:=s+';'+Dir+'rtl'+DS+SrcOS2+DS + +';'+Dir+'rtl'+DS+SrcOS2+DS+TargetProcessor; + end; s:=s +';'+Dir+'rtl'+DS+TargetProcessor+DS +';'+Dir+'rtl'+DS+TargetOS+DS+TargetProcessor+DS; diff --git a/designer/designer.pp b/designer/designer.pp index f7c766553b..4a3d9d4dfd 100644 --- a/designer/designer.pp +++ b/designer/designer.pp @@ -1996,12 +1996,14 @@ end; procedure TDesigner.ValidateRename(AComponent: TComponent; const CurName, NewName: string); + {$IFDEF VER2_0_2} procedure RaiseInvalidName(ConflictComponent: TComponent); begin raise EComponentError.Create(Format( lisDesThereIsAlreadyAnotherComponentWithTheName, ['"', ConflictComponent.Name, '"'])); end; + {$ENDIF} var i: Integer; @@ -2012,6 +2014,7 @@ begin or ((AComponent<>nil) and (csDestroying in AComponent.ComponentState)) then exit; + {$IFDEF VER2_0_2} // check, if there is already such a component for i:=0 to FLookupRoot.ComponentCount-1 do begin CurComponent:=FLookupRoot.Components[i]; @@ -2021,6 +2024,7 @@ begin RaiseInvalidName(CurComponent); end; end; + {$ENDIF} // check if component is the LookupRoot if AComponent=nil then AComponent:=FLookupRoot;