Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trouble closing (releasing) form - HELP!!!
Message
From
27/10/1999 14:15:27
 
 
To
27/10/1999 14:02:13
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00281960
Message ID:
00282448
Views:
25
>>>>If your array contains references to the CheckBox objects, you'll have to NULL out each array index individually in a loop. You can do that in the QueryUnload method Barbara described to you earlier.
>>>>
>>>>FOR xx=1 TO ALEN(array,1)
>>>> array[xx] = .NULL.
>>>>ENDFOR
>>>>
>>>>or however it is you have your array dimensioned.
>>>
>>>You can assign a value to every member of the array by assigning that value to the array without specifying and index:
>>>
>>>Myarray = .NULL.
>>
>>Erik:
>>
>>I heard/saw someone say that doesn't work for releasing an array of objects. Do you know if that works or not in that case?
>
>It works.
>
>DIMENSION ObjArray(2)
>ObjArray[1] = _SCREEN
>ObjArray[2] = _SCREEN
>ObjArray = .NULL.
>?ObjArray[1].Name && Gives an error

You're right it works. I tried it as both a public array and as an array property of a form. The array property seems to release all the objects without doing anything special (this may be dependant on the type of object, though). The public array requires setting the array to .NULL. for the form to close.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform