Changeset 218 for Docking/CoolDocking/UCDCommon.pas
- Timestamp:
- Mar 23, 2011, 12:22:26 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Docking/CoolDocking/UCDCommon.pas
r217 r218 79 79 implementation 80 80 81 var 82 UniqueNameCounter: Integer; 83 81 84 function GetUniqueName(BaseName: string): string; 82 var 83 I: Integer; 84 begin 85 I := 1; 86 while Assigned(FindGlobalComponent(BaseName + IntToStr(I))) do Inc(I); 87 Result := BaseName + IntToStr(I); 85 begin 86 Result := BaseName + IntToStr(UniqueNameCounter); 87 Inc(UniqueNameCounter); 88 88 end; 89 89 … … 211 211 end; 212 212 213 initialization 214 215 UniqueNameCounter := 1; 216 213 217 end. 214 218
Note:
See TracChangeset
for help on using the changeset viewer.