Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
C..5 with TreeView
Message
De
03/02/1999 00:53:50
Kenneth Downs
Secure Data Software, Inc.
New York, États-Unis
 
 
À
02/02/1999 22:36:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00182987
Message ID:
00183308
Vues:
20
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
Fil
Voir

Click here to load this message in the networking platform