Online Help TEDIDataObjectList

Unit JclEDI

Types

TEDIDataObjectList

   A descendent of TEDIObjectList used specifically for managing TEDIDataObjectListItem type objects.

 Function

function CreateListItem(PriorItem: TEDIObjectListItem;
  EDIObject: TEDIObject = nil): TEDIObjectListItem; override;

   This function was overridden so it will create TEDIDataObjectListItem objects.

 Function

property EDIDataObject[Index: Integer]: TEDIDataObject read GetEDIDataObject
  write SetEDIDataObject; default;

   This property is declared as the new default property.

Usage

Notes & Examples

   Some simple examples.

 Example #1

procedure DoSomething(List: TEDIDataObjectList);
var
  Item: TEDIDataObjectListItem;
begin
  Item := List.First;
  while Item <> nil do
    DoSomethingWithItem(Item);
    DoSomethingWithEDIDataObject(Item.EDIDataObject);
    Item := Item.Next;
  end;
end;

 Example #2: Using dynamic array compatibility.

procedure DoSomething(List: TEDIDataObjectList);
var
  I: Integer;
begin
  for I := 0 to List.Count - 1 do
  begin
    DoSomethingWithItem(List.Item[I]);
    //The easy way.
    DoSomethingWithEDIDataObject(List[I]);
    //The harder way.
    DoSomethingWithEDIDataObject(List.Item[I].EDIDataObject);
  end;
end;