Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FYI AddProperty function
Message
 
 
À
06/01/2004 01:51:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00864104
Message ID:
00864138
Vues:
12
Hi Steve,

There's good explanation why it happens and workaround at http://west-wind.com/wwthreads/ShowMsg.wwt?MsgId=0Y40USMEN. Basicly you should avoid using FOR EACH with collection of objects and use FOR loop instead.

>I have a collection of objects created with SCATTER NAME for a small set of records. I pass this collection as a parameter to another object. Before I do, I add a calculated value to each member of the collection. After passing the collection as a parameter, my calculated properties do not show. Turns out the documentation for ADDPROPERTY() function does say it will not work with object references in a FOR EACH loop. The documentation say you can use the addProperty method. The SCATTER NAME object does not have an Addproperty method. This can be done though as shown below. I suspect this issue is related the fact that ITEM is a method of the collection class, not a property. It returns a member of the collection, but is not itself a member.
>
<snip>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform