[Lazarus] Iterate TStringToStringTree

Juha Manninen juha.manninen at phnet.fi
Tue Jun 15 10:05:34 CEST 2010


Hi

Is there a cleaner way to iterate TStringToStringTree? This is the 
codetoolsstructs version but the LCL version is almost the same.


var
  MapToEdit: TStringToStringTree;
  Node: TAVLTreeNode;
  Item: PStringToStringTreeItem;
begin
  ...
    Node:=MapToEdit.Tree.FindLowest;
    while Node<>nil do begin
      Item:=PStringToStringTreeItem(Node.Data);

      // *** use Item^.Name and Item^.Value ***

      Node:=MapToEdit.Tree.FindSuccessor(Node);
    end;



Regards,
Juha




More information about the Lazarus mailing list