Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Equilalent to VB Collection Object
Message
From
10/05/1999 15:39:20
 
 
To
10/05/1999 15:02:35
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00216845
Message ID:
00216862
Views:
23
>Is there an equivalent object in VFP
>to VB Collection data type?
>
>I want to return data from a COM object
>in VFP by way of a Collection like in VB.
>
>If there isn't, how do you return data
>from a VFP Com object?

You can emulate a collection by creating an array property and method that takes a numeric parameter as an index. Just name your method what you want the collection to be called, and have the method return the value of the corresponding element of the array.

If you want functionality to add and delete items from the "collection", you can write that too, but getting the syntax to be identical will be a problem. You can return objects from VFP COM servers.

Your "collection" won't show up in object browsers as so, but can be accessed exactly like one.

Just brainstorming for you- if you give a little more information as to what you need to accomplish, maybe I could be more specific.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform