>>>nn = node.Child
>>>FOR xx=1 TO node.Children
>>> ... process nodes here
>>> nn = nn.Next && Here's the line that caused my problem, especially in VFP5!
>>>ENDFOR
>>
>>and how did you manage the problem? I have encountered the same problem (not being able to release the form with the treview if I used this sytax: nn=nn.Next), and I dont know what to do.
>>
>>Help me please: Mikós
>
>Well, according to TreeView's help, the .next is an object, and if a node doesn't have a regular next member, this object should be .null.; if you try to use it your code should break. As Renato said, check nn.next.index - if it's not a number between 1 and number of nodes, than your node has no .next node. Your nn is a stranded object.
>
>nn.next should be an object reference or .null., but I've already found strange things happening with TreeView, even empty strings instead of object reference, so checking it's index would be safer.
I had code checking for .NULL. nn object. I even tried releasing nn variable in my code. It made no difference. That's why I had to re-think my code and eliminated the need for it. Checking for the .index being within range sounds like a more solid working method, anyways, if I ever need to make use of it in the future.
>
>(Külonben, hogy áll a dolog AlbaComppal? Üdvözölj Sos Jancsit, ha ismersz.)