Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Friday afternoon toughie - tree endless loop
Message
De
03/02/2019 13:15:20
 
 
À
01/02/2019 19:35:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012 R2
Network:
Windows Server 2012 R2
Database:
Visual FoxPro
Application:
Desktop
Virtual environment:
VMWare
Divers
Thread ID:
01665871
Message ID:
01665881
Vues:
62
Hi Al,

I knew someone here would think of something - I think you have seen the holy grail through the trees (to mix metaphors/movies). I already have a function GetTopMostParent_ID that looks upwards parent by parent until it hits a parent with no parent id itself. I could modify that function or create a new one that just does a "check".

Or better yet, I could write a function that also keeps an array of the parent id's as it loops upward and as soon as I hit the same parent twice, I must be in a loop.

Thanks!

>
>One way to structure lists like this is to have top-level entries that have no parents. If you've done that you could "walk" through the parents of the candidate node (CN) that is about to be changed. If you eventually hit an empty parent, then OK. If you hit CN, then you have a loop and you disallow the change.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform