Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using the collection class
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00899345
Message ID:
00899353
Views:
14
In your code all collection items store reference to the same object.

>Am I doing this wrong, does this create a different oItem for each iteration or does it just create a link to the same object each time.
>
>Thanks,
> Nick
>
>
>oCol=CREATEOBJECT("Collection")
>oItem=CREATEOBJECT("Empty")
>	AddProperty(oItem, "MyProp1", "One")
>
>FOR nCount=1 TO 10000
>	oCol.Add(oItem)
>ENDFOR
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform