Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FYI AddProperty function
Message
 
 
To
06/01/2004 01:51:27
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00864104
Message ID:
00864138
Views:
13
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform