General information
Category:
Forms & Form designer
Title:
Releasing windows defined by a form
Hi,
I have a form, lets call it FormA which defines a window in its init event and release it in its unload event as below
-------------
init event
-------------
Line1:
DEFINE WINDOW Output ;
AT 0, 0 Size 39, 60 ;
IN Desktop ;
NAME oOutputWin ;
FONT "Verdana", 11 Style "B" ;
TITLE "Output display" ;
FLOAT ;
GROW ;
NOMDI ;
MINIMIZE
Line2:
oOutputWin.Name = [frmOutput]
------------------
unload event
------------------
RELEASE WINDOWS Output
DODEFAULT()
When I run FormA, I use debugger to watch the _SCREEN.FORMS, both reference for FormA and the 'Output' window it defines are present.
When I close FormA, again from the _SCREEN.FORMS, I find that only FormA's reference is gone, the reference for 'Output' window remains!
However, if Line2 in the init event is removed both FormA and 'Output' window's reference will be nicely released.
My question (I am very curious),
Why the line 'oOutputWin.Name = [frmOutput]' will stop the 'Output' window from being released properly in the unload event of FormA?
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only