Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object Collections?
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00420599
Message ID:
00420615
Views:
25
>Thanks for the feedback, Ko.
>Actually, I considered that, but unless I'm misunderstanding it, I don't believe that this is a true "collection". I can still handle it that way if I need to. I think what I was looking for was the ability to reference the object through code as:
>
>Object.Collection("Member").Property = "whatever"
>
>I think with an array of objects, I may still be able to get away with a For Each...Next loop, though.
>
>Thanks again,
>John

I think you have to create your own.
Create a myObjectArray[] array to store the reference to the objects.
Create a MyColletion property to the object.
Let that property have a acces method.
In that acces method look if the parameter is a number or a name.
In case of a number then return myObjectArray[number]
In case of a name then go trough the array and return the matching array.

This is in short a setup for a collection like in VB
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform