Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Collections within collections within collections
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00834424
Message ID:
00834673
Views:
29
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform