Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP Equilalent to VB Collection Object
Message
De
10/05/1999 15:39:20
 
 
À
10/05/1999 15:02:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00216845
Message ID:
00216862
Vues:
22
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform