Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Am I the only one who did not know this?
Message
From
30/11/2000 23:43:48
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00436744
Message ID:
00447864
Views:
33
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform