Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem releasing form with TreeView control
Message
From
12/09/1998 15:38:08
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
To
10/09/1998 13:37:05
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00132847
Message ID:
00135825
Views:
10
>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform