Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Collection Object
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00273466
Message ID:
00273475
Views:
33
Arrays can be resized dynamically in VFP. So, you can use an array.

Vlad

>Anyone know if there is a collection object in VFP5?
>
>I'm creating two custom objects, cusUser and cusRights. When a user logs in, I instatiate the cusUser object and assign properties for that user from the user table.
>
>The next step is to read in all the rights for this user from the rights table. This is a multi-record, multi-column table and there can be any number of rights per user.
>
>The idea is that when the user object is instantiated, it scans through the rights table and adds rights objects to the user object.
>
>What I'd like to accomplish is this sort of end result:
>
>cusUser.Password
>cusUser.FullName
>cusUser.Rights(1).Key
>cusUser.Rights(1).Field1
>cusUser.Rights(1).Field2
>cusUser.Rights(2).Key
>cusUser.Rights(2).Field1
>cusUser.Rights(2).Field2
>
>The Rights are a dynamic-sized collection object. Anyone know how to do this in VFP?
>
>Scott
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform