On September 2, 2010 5:14:50 PM, Juha Manninen wrote:


> If your input data contains a string which always
> identifies the parent node then you can map the 
> string -> "parent node" and find it later for adding
> a child node.
>
> Pseudo code again:
> ...
> ...
> If you don't have such ID then you must use recursion.

Thanks José and Juha, now I see the light. :-)


On September 2, 2010 8:11:53 PM, Flávio Etrusco wrote:

> When reading from registry and populating a treeview, a
> recursive function is the least of your worries regarding
> "performance" (or memory, if you're careful).

I'm a crash-phobia :-). Stack sizes are different among the OS platforms. A 
superdeep recursion will trigger a stack overflow exception.




_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to