Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem releasing form with TreeView control
Message
De
10/09/1998 15:26:29
 
 
À
10/09/1998 13:37:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00132847
Message ID:
00135189
Vues:
10
>>
>>My problem was in the EXPAND event I was trying to traverse the child nodes with the NEXT property in a manner it didn't like. In VFP6, my code failed to let me out of the form EVERY time, not just 20% of the time like in VFP5. That made it much easier to determine what the real problem was.
>>
>>
>>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
>>
>
>Fred,
>
>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


The way I structured my code, I didn't need to do this anymore. I'm only populating the child nodes with their children if needed during the expand. I have a place holder to indicate that a child DOES HAVE children, and during the expand, I check for the place holder, replace it with the first child, and then add other child nodes, checking each if they need a place holder or not. This way,
1) I don't have to actually build all levels of the tree if they're not going to be viewed and
2) I don't have to traverse a nodes child nodes anymore.

Sorry if this doesn't help. It solved my problem. I still don't know why the other code doesn't work.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform