Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
More on object refs keeping forms open
Message
From
12/11/1998 09:22:26
 
 
To
12/11/1998 07:58:57
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00156863
Message ID:
00156935
Views:
36
Hi, Vlad-

Actually, I was doing something like this:
LOCAL loi
FOR EACH loi IN thisform.StepResults
  loi = .NULL.
NEXT
Instead I needed to do this:
thisform.StepResults = .NULL.
Maybe it's obvious to others, but to me--being literally minded--I was thinking that, well, the property stepresults is an array. It's the elements that are object reference, and therefore it's the *elements* I need to set to .NULL. But I was incorrect in my assumption. So, just in case someone else is making this assumption, it could be a subtle cause for a form not releasing.

>This is not related to object refs. In VFP, when a value is assigned to an array (used as simple var, not as array), all elements in the array are set to that value. Ex:
>
>dimension a[100]
>for i = 1 to 100
> a[i] = i
>endfor
>*-- Here all elements in the array are different
>a = 5
>*-- Here all elements in the array are 5
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform