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:
00273481
Views:
16
Thanks for the reply. Yes, I know arrays are dynamic-sized. But they're not objects. They don't follow the object model. In other words, with memory arrays you cannot say

MyArray(1).Item1
MyArray(1).Item2
MyArray(2).Item1
MyArray(2).Item2

Instead, you would have to say

MyArray[1,1]
MyArray[1,2]
MyArray[2,1]
MyArray[2,2]

I don't want to use a multi-dimension memory array. I'm looking to do this application with an object model.

I'd just like to know if there is a Collections object in VFP, or if someone else has figured out how to replicate one _programmatically_.

Thanks anyways!

Scott


>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
Scott A. Keen
MCP

"I'm not in denial. It's just not my fault."

"So long and thanks for all the fish."
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform