[Lazarus] Iterate TStringToStringTree

2010-06-15 Thread Juha Manninen
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 Nodenil

Re: [Lazarus] Iterate TStringToStringTree

2010-06-15 Thread Mattias Gaertner
On Tue, 15 Jun 2010 11:05:34 +0300 Juha Manninen juha.manni...@phnet.fi wrote: Hi Is there a cleaner way to iterate TStringToStringTree? This is the codetoolsstructs version but the LCL version is almost the same. With fpc 2.5.1 you could write an enumerator:

Re: [Lazarus] Iterate TStringToStringTree

2010-06-15 Thread Graeme Geldenhuys
On 15/06/2010, Juha Manninen wrote: Is there a cleaner way to iterate TStringToStringTree? This is the codetoolsstructs version but the LCL version is almost the same. With any FPC version your can simply create a new Iterator descendant. See the link below for a description. The code is