Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange problem with Treeview SelectedItem property
Message
From
25/07/2003 20:14:54
 
 
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00812987
Message ID:
00813676
Views:
18
Viv,

It's of course true that the fox sees a problem. And it is evident to me that it is .SelectedItem that is the problem.

Restating the issue... the same code works flawlessly time after time (start form, use it some, stop it, repeat several times).
The identical code fails instantly if it is run after a certain other program has run. So the issue is WHY???? And more importantly, how can I fix it?

The other form makes no use of a Treeview control. The other form is related only in that it is also started from the file menu.

A later development (thanks to TerryT) is that if I code
ThisForm.Tree.Nodes(1).Selected = .T.
before the following statement
ThisForm.List.FillList(ThisForm.Tree.SelectedItem)
things run properly under ALL conditions.

This, however, is not a solution because Nodes(1) is likely not the TOP node of the tree once .SORTED = .T. is used in the control.

In summary, I NEED to use .SelectedItem uncoerced (Treeview naturally selects the TOP node on initial display after filling it) and it works nicely EXCEPT in a specific circumstance. I need to identify that circumstance and evade it.

I am not in a position to use ASSERTs. I am limited to testing using the .EXE. That's just the way it is.

cheers


>Hi Jim,
>
>>>Well I don't see how there can be
>
>Then I guess you and the fox disagree <s>. Why not put an ASSERT in there to find out who's right.
>
>Regards,
>Viv
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform