Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: Desktop form can create As top Zombi
Message
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Title:
BUG: Desktop form can create As top Zombi
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01053676
Message ID:
01053676
Views:
66
Observed: if you close a As Top form,
after Queryunload, all "In Top" child forms with Desktop=.F. are closed via Queryunload,
and a NODEFAULT stop the release process ENTIRELY.
This is sufficient ( best if child queryunload can to be call before of the parent )
But if a child Form is Desktop=.T. ( WS_POPUP )
the As Top go to Unload, then it is OS WINDOWS that try to close the childs,
but a Queryunload stop the process,
now, the As Top don't exist enymore in VFP, but it exists in OS.

Expected: after an As Top Queryunload ( best if before !)
all the child forms have to be released via QueryUnload.

Repro:
- run
- click close X in "Zombi Candidate"
- rightclick on "Voodo" window
- now you cannot destroy the Zombi window
( but not worried you, it don't create damages and it can make you company )
CLEAR ALL
RELEASE MEMORY ALL

PUBLIC FTOP
FTOP = NEWOBJECT("ASTOP")
FTOP.SHOW


DEFINE CLASS ASTOP AS Form
	showwindow = 2
	AUTOCENTER = .T.
	Caption = "Zombi Candidate"
	
	PROCEDURE INIT
		THIS.Print("PHASE 1: CLICK ON X CLOSE",THIS.WIDTH-200,3)
		
	PROCEDURE Activate
		IF VARTYPE(fdesk)=="U"
			PUBLIC fdesk
			fdesk = NEWOBJECT("INTOPDESKTOP")
			fdesk.SHOW
		ENDIF
	
ENDDEFINE

DEFINE CLASS INTOPDESKTOP AS Form
	showwindow = 1
	desktop	   = .T.
	Caption = "Voodo"
	
	PROCEDURE INIT
		THIS.Print("PHASE 2: RIGHCLICK RELEASE",THIS.WIDTH/2-80,THIS.HEIGHT/2-10)
		
	PROCEDURE rightclick
		this.Release
	ENDPROC
	
	PROCEDURE queryunload
		NODEFAULT
	ENDPROC
	
ENDDEFINE
Fabio
Next
Reply
Map
View

Click here to load this message in the networking platform