Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Treeview .Object property weirdness
Message
 
 
To
25/09/2002 08:07:46
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00703871
Message ID:
00704221
Views:
14
Ken,

I'm pretty sure this is an acknowledged bug using FOR EACH to iterate the treeview nodes. The other forloop you posted is the best workaround.

>Actually - we traced it to something that HAS to be a bug - namely a "for each loop"
>When treeview form is instatiated oTree.object correctly references the treeview object.
>Then we called a method that did a
for each loNode in oTree.Nodes
>do something
>endfor
after running that - oTree.object references the first node object! We fixed it by simply changing to
for i = 1 to oTree.Nodes.Count
>loNode = oTree.Nodes(i)
>do something
>endfor
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform