Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Collections within collections within collections
Message
De
03/10/2003 04:00:29
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00834424
Message ID:
00834673
Vues:
28
Hi,

>
oSecItems = CREATEOBJECT('COLLECTION')
oNode     = CREATEOBJECT('COLLECTION')

oSecItems.ADD(oNode, 'ROND')
oSecItems.ADD(oNode, 'GROUP1')
oSecItems.ADD(oNode, 'GROUP2')

cCurrentNode = oSecItems.GETKEY('ROND')

oSecItems(cCurrentNode).ADD(oNode, 'MODULE1')
oSecItems(cCurrentNode).ADD(oNode, 'MODULE2')

*-- I am having problems getting past here.
>

Aren't you just using the same collection for all the 'sub-collections' (and even adding a collection as a member of itself) ?
Try:
oSecItems = CREATEOBJECT('COLLECTION')

oSecItems.ADD(CREATEOBJECT("COLLECTION"), 'ROND')
oSecItems.ADD(CREATEOBJECT("COLLECTION"), 'GROUP1')
oSecItems.ADD(CREATEOBJECT("COLLECTION"), 'GROUP2')

cCurrentNode = oSecItems.GETKEY('ROND')

oSecItems(cCurrentNode).ADD(CREATEOBJECT("COLLECTION"), 'MODULE1')
oSecItems(cCurrentNode).ADD(CREATEOBJECT("COLLECTION"), 'MODULE2')

* etc,etc
HTH,
Viv
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform