Kendall,
Well, I'm pretty excited. Not only can I reproduce it, I can fix it.
Here's how to make it happen:
1. Create a form with a Treeview and Imagelist. Use Version 6
2. In the TreeView init, populate with some nodes. Be sure to select one of the items
3. Put a command button on that walks the tree with this command: Thisform.WalkTheTreeView(thisform.MyTreeView.SelectedItem.Root)
4. In the form, create WalkTheTreeView. All you really need to do to get the error is create a local pointer to a node, as in:
LPARAM loNode
Acti screen
? LoNode.Text
IF loNode.Children > 0
thisform.WalkTheTreeView(loNode.Child)
ENDIF
DO WHILE .t.
IF TYPE("loNode.Next.Key") = "C"
loNode = LoNode.Next &&--THE ERROR LINE
acti screen
? LoNode.Text
IF loNode.Children > 0
thisform.WalkTheTreeView(loNode.Child)
ENDIF
ELSE
EXIT DO
ENDIF
ENDDO
To correct the error, use this simpler tree walker that does not create a pointer:
LPARAM loNode
Acti Screen
? LoNode.Text
IF loNode.Children > 0
Thisform.WalkTheTreeView(loNode.Child)
ENDIF
IF TYPE("loNode.Next.Key") = "C"
Thisform.WalkTheTreeView(loNode.Next)
ENDIF
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement