Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Collections within collections within collections
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Collections within collections within collections
Miscellaneous
Thread ID:
00834424
Message ID:
00834424
Views:
68
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.
How do I access things at MODULE1 and MODULE2 above.

This is what I am working towards

A security object:

oSecurity

The security object has a collection: .oSecItems


Each element in this collection is a key to a sub collection, 1 for the user name and 1 for each group the user belongs to.

oSecurity.oSecItems.ROND
oSecurity.oSecItems.GROUP1
oSecurity.oSecItems.GROUP2

Each group caontains a collection that represents each module for the app.

oSecurity.oSecItems.ROND.MODULE1
oSecurity.oSecItems.ROND.MODULE2

oSecurity.oSecItems.GROUP1.MODULES1
oSecurity.oSecItems.GROUP1.MODULES2
....

Each Module contains a collection that represents item.value for that module.


oSecurity.oSecItems.ROND.MODULE1.ITEM1.VALUE
oSecurity.oSecItems.ROND.MODULE1.ITEM2.VALUE

oSecurity.oSecItems.ROND.MODULE2.ITEM3.VALUE
....
What ben makes tracks for what wil be. Words in the air pirnt foot steps on the groun for us to put our feet in to.

Riddley Walker
Next
Reply
Map
View

Click here to load this message in the networking platform