Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
More on object refs keeping forms open
Message
De
12/11/1998 19:43:00
 
 
À
12/11/1998 09:22:26
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00156863
Message ID:
00157247
Vues:
30
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform