Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
More on object refs keeping forms open
Message
From
12/11/1998 19:43:00
 
 
To
12/11/1998 09:22:26
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00156863
Message ID:
00157247
Views:
33
I don't get it. The two versions of your code are equivalent. Where's the wrong assumption?

You only replaced 4 lines of code with only one. The result is the same. Only that your one line code is somehow obscure (compared to the first version that is very clear).

Vlad

>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