Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dealing with dangling reference
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01539074
Message ID:
01539230
Views:
62
>>>
>>>FOR EACH oForm in Application.Forms
>>>   IF TYPE("oForm.name") = "C"
>>>      oForm.Release()
>>>   ENDIF
>>>ENDFOR
>>>
>>
>>This releases the odd (ffirst, third, fifth, ..) forms only.
>
>Because of the way a collection works versus an array of object references. I had missed the use of the collection, that will do exactly what you saw.

And contrary to what others may have said the test for the data type of the name property WILL prevent the error that was originally asked about, it will not make the collection work like an array.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform