[Lazarus] How to iterate through a TAvgLvlTree
klenin at gmail.com
Fri Mar 16 10:47:15 CET 2012
On Fri, Mar 16, 2012 at 19:36, Mattias Gaertner
<nc-gaertnma at netcologne.de> wrote:
>> Is it possible to iterate through all items in a TAvgLvlTree? I
>> couldn't find an easy method for doing that.
> for Node in Tree do
By the way, I think you are using TAvgLvlTree rather often,
so did you ever wanted another traversal order besides the default one?
You replaced my proposal of extending the for..in loop on the wiki
by an example implementing it using the current syntax.
So, I am interested -- did you actually use you implementation?
What is your opinion -- did it work well for you?
In particular, I am interested in the memory management issues --
how is enumerator instance freed in your example?
Finally, do you feel the need for the remaining extension proposal --
namely, getting the index from enumerator?
Alexander S. Klenin
More information about the Lazarus