Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem releasing form with TreeView control
Message
De
12/09/1998 15:38:08
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
10/09/1998 13:37:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00132847
Message ID:
00135825
Vues:
9
>>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.

(Külonben, hogy áll a dolog AlbaComppal? Üdvözölj Sos Jancsit, ha ismersz.)

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform