Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
More on object refs keeping forms open
Message
 
À
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:
00157037
Vues:
29
>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

Nancy,

I'll agree with NULL to obj references. And I also create them in arrays but have not experienced any problem with aSomeArray = .F. to allow a form to release. Individual properties of obj references always get set to NULL but I must also admit, I totally spaced setting my arrays to NULL (so used to using .F. in the past). Just letting you know I haven't had a problems yet with it but thanks for the insight and will keep you informed.

Steve
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform