Changeset 316 for trunk/UItemList.pas
- Timestamp:
- Jun 19, 2024, 11:53:06 PM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UItemList.pas
r315 r316 1 1 unit UItemList; 2 2 3 {$mode delphi}4 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, fgl, DOM, XML, Common, Graphics;6 Classes, SysUtils, Generics.Collections, DOM, XML, Common, Graphics; 9 7 10 8 type … … 33 31 { TItemFields } 34 32 35 TItemFields = class(T FPGObjectList<TItemField>)33 TItemFields = class(TObjectList<TItemField>) 36 34 function AddField(Index: Integer; SysName, Name: string; DataType: TDataType): TItemField; 37 35 function SearchByIndex(Index: Integer): TItemField; … … 78 76 { TItemList } 79 77 80 TItemList = class(T FPGObjectList<TItem>)78 TItemList = class(TObjectList<TItem>) 81 79 NewId: Integer; 82 80 class function GetItemClass: TItemClass; virtual; … … 120 118 destructor TItemField.Destroy; 121 119 begin 122 EnumStates.Free;123 inherited Destroy;120 FreeAndNil(EnumStates); 121 inherited; 124 122 end; 125 123 … … 316 314 ReferenceList := GetReferenceList(Field.Index); 317 315 if (ReadId > 0) and Assigned(ReferenceList) then 318 SetValueReference(Field.Index, TItem(ReferenceList .List[ReadId]));316 SetValueReference(Field.Index, TItem(ReferenceList[ReadId])); 319 317 end else 320 318 raise Exception.Create(Format(SUnsupportedDataType, [DataTypeStr[Field.DataType]]));
Note:
See TracChangeset
for help on using the changeset viewer.