>>Recursive doesn't have anything to do with it AFAIK. I was trying to add child nodes "on the fly" when a parent node was clicked. Like I said, if you create a local variable reference to a TreeView.Child property, you now have a "hanging" form (sometimes). I was only creating this local variable to reduce the typing involved with my code, no recursion. Doesn't make much sense to me!
>
>Hi Fred,
>
>Like I said, I've never encountered it the problem you're having so I can't comment. The reason, however, that I mentioned recursion was that improper termination of the function could very well lead to a "hanging" or "dangling" reference.
Hi George,
I agree, improper code in recursive routines can cause a world of grief. I've pretty much always tried to avoid recursive routines in Fox. The number of "program levels" is rather limited, and I've always found it's not that difficult in recursive routines to end up many hundreds of "levels" deep. I had done a "seed fill" routine in C once, that while only 4 lines of code, required stack space of ~256K to work. Took an extremely long time to unwind, as it was going about 2000 levels deep! Oh, the days of the 4.77Mhz processors...