[fpc-pascal] TreeView and Nonrecursion

Flávio Etrusco flavio.etrusco at gmail.com
Thu Sep 2 15:11:53 CEST 2010


On Wed, Sep 1, 2010 at 6:20 PM, Bihar Anwar <bihar_anwar at rocketmail.com> wrote:
> On 2 September 2010 3:53:34 AM, Vannus wrote:
>
>> i probably shouldn't open my mouth, as i don't quite understand the
>> question...
>> however FRED from the game Freespace let you design missions using a
>> treeview.
>
> Just to make my question clear, for example, I can fill a TreeView control
> with particular Registry keys by enumerating registry keys recursively and
> put them in the TreeView control; then for performance reason, I attempt to
> use a nonrecursive/iterative approach to enumerate registry keys, but how
> can I fill the TreeView since a "tree" is naturally recursive? Is recursion
> is the only way to achive it?
>

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).

-Flávio



More information about the fpc-pascal mailing list