Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Am I the only one who did not know this?
Message
De
30/11/2000 23:43:48
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00436744
Message ID:
00447864
Vues:
35
>The click method of an okay button on a modal form I had the following code.
>
>Procedure cmdOkay.Click
>Local lcFile,lcType...
>
>With This.Parent && The parent is the modal form
> lcFile=.txtMergeFile.Value
> lcType=.comMergeType.Value
>EndWith
>*
>*Code to do the merging
>*
>
>...
>
>ThisForm.Release
>EndProc
>
>The form never released when the merging finished and the Release method was called. Obviously there was a dangling object reference somewhere. The only problem was I never refered to any objects in my code.
>
>However, when I changed "With This.Parent" to "With Thisform" everything worked fine. I am assuming that the "EndWith" does not clear any objects referenced
>by the "With" command. Am I correct in my understanding? Did anyone else know this already?
>
>Thanks
>Simon

Are you sure that the form is the parent? (The OK button isn't a member of a command button group is it?)
"The Iron Fish: The water is cold...but the fish don't mind"
...Jay Jenks, boyhood chum
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform