Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Array question
Message
De
09/09/1998 14:37:26
 
 
À
09/09/1998 14:33:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00134705
Message ID:
00134708
Vues:
10
>I have created an array to access several command buttons in the forms init procedure.
>
>Public Array MyArray[2]
>MyArray[1] = Thisform.cmdOne
>MyArray[2] = Thisform.cmdTwo
>
>In another command buttons click event, I have the following code.
>
>For i = 1 To 2
> MyArray[i].Caption = "Test " + Alltrim(Str(i))
>EndFor
>
>When I run the form the command button works properly and changes the captions on the other buttons. But when I attempt to exit the form I get an error message...
>
>File cannot be closed because outstanding references exist.
>Can anybody help me out?
>Thanks in advance for any help offered.
>
>John Symons

All such references should be set to .NULL. in form destroy event. In your case it means MyArray=.NULL.
Also, you could consider using form's property-array, it's better way.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform