Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't release a form in VFP 5.0
Message
De
12/04/1999 09:05:26
Andrzej Majlich
Vulcan sp. z o. o.
Wroclaw, Pologne
 
 
À
09/04/1999 10:31:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00206862
Message ID:
00207402
Vues:
10
I've checked some ideas during the weekend - nothing helped.
I suppose I've found a bug in VFP - here is the proof:

Trying to extract the problem I reduced all cases to a simpliest form.
But instead of typing the code here I will reference to TASTRADE.
There is an app object named tastrade. A code from the tastrade.cleanup method:
FOR EACH loForm IN application.Forms
	IF TYPE("loForm") == "O" AND loForm.Baseclass == "Form"
		IF !loForm.QueryUnload()
			RETURN .F.
		ENDIF
		loForm.Release()
	ENDIF
ENDFOR
Everything is OK, isn't it?

But - let's make a little experiment.
Try to launch the tastrade app under debugger with a breakpoint set in cleanup. Open some windows (Customers, Orders etc.) and click on their grids (second pages in pageframe). Now select 'Return to VFP' option from menu. Your debugger should stop at the cleanup procedure. Step the lines - especially this with loForm.Release() and watch the screen. You should notice that the first window you opened (Customers f.e.) hasn't disappeared (!!!). What more - still pressing F8 - after the last line of cleanup You find yourself in Customers.Destroy!!!
Interesting, isn't it?


>>>>The problem seems to happen when the focus is set to a control in the grid placed on the form. When the cursor is outside the grid all is OK.
>>
>>>A form will not release if any reference to it is still active.
>>
>>So I'm wondering when such a "blocking" reference can arise? And how it disappears when I click outside the grid?
>>No, it's impossible.
>
>Firstly, one (maybe irrelevant) tip: you should loop _SCREEN.Forms in reversed direction:
>nLoop=_SCREEN.Formcount
>For n=nLoop to 1 Step -1
>...
>
>Check again, do you have any custom form references with Type="O"?
_________________

*|| Andrzej [NJ].
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform