Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form not releasing properly
Message
 
 
To
01/05/2006 14:42:27
Alan Harris-Reid
Baseline Data Services
Devon, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01118130
Message ID:
01118151
Views:
12
SWAG, but did you check that thisform.release() is being called?

>Using VFP8, I have a class-based form which I launch using the following code.
>
>
>loForm = CREATEOBJECT('MyFormClass')
>
>IF VARTYPE(loForm)='O'
>   WITH loForm
>      * Set some properties here
>
>      .Show()         && displays form
>   ENDWITH
>ENDIF
>
>
>The form contains a method which should close the form using thisform.release. The release method fires but the form does not close, and the trace window still shows the .Show() line as the currently executing line. Is there something wrong with my code?
>
>I was thinking that the form is not releasing because the object reference loForm is still in scope, but if I close the window via the close X, thisform.QueryUnload() fires, followed by .Destroy(), the form closes fine and execution proceeds to the ENDWITH command and onwards.
>
>How can I get past the .Show() line when I close the form using thisform.release? I have put 'this.destroy' in the form release method and although it works, it is a kludge which I am not happy with.
>
>Any help would be appreciated.
>
>Alan
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform