Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Full screen
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Versions des environnements
Visual FoxPro:
VFP 8
Database:
Visual FoxPro
Divers
Thread ID:
01066715
Message ID:
01094093
Vues:
12
>I asked this, becuase I have a BIG problem with it. That way a new public variable _oreportoutput i screated and never released. I have a problem becuase this caused following:
>All tables in Form Private DataSession that are opened outside the DE are not closed after forms release, but all tables that are in DE are closed perfectly :o).
>I don't know what to sugest because I am not familiar with MM Framework. I have no problem at all with closeg the application when the preview is opened. What about looping through _SCREEN.Forms collection and try to close opened forms?

Here is the Cleanup method. The Messagebox always returns .T. Using Keyboard ESC or Ctrl+W also returns .t. oForms.CloseAllOpenForms is supposed to close all open forms. What are you using to close Preview screen? I can add looping through _screen form's collection just in case.
lparameters tlForceShutDown

local lcOnShutdown

_screen.mousepointer = MOUSE_HOURGLASS

*-----------------------------------
*--- Close all applications forms
*-----------------------------------
with this	

	if vartype(.oForms) = 'O' and not .oForms.CloseAllForms(m.tlForceShutDown)
		return .f.
	endif

	if vartype(.oUserLogMgr) == 'O'
*-----------------------------------------------------------------
*-- Close the entry in the user log
*-----------------------------------------------------------------
		.LogUserActivity("Logout")

		.oUserLogMgr.release()
	endif

	if vartype(.oRecordMgr) == 'O'
*-----------------------------------------------------------------
*-- Unlock any records the user may have open.
*-----------------------------------------------------------------
		.oRecordMgr.UnlockAll(.cUserid)
		.oRecordMgr.release()
	endif

*-----------------------------------------------------------------
*-- Release the timer and run the parent code.
*-----------------------------------------------------------------
	.ReleaseDesktopTimer()

	.ReleaseAbstractFactory()
	.ReleaseDBCMgr()

*----------------------
*-- Restore the caption
*----------------------
	_screen.caption = .cOldMainWindCaption
	set message to ""

*-------------------------------------
*-- Restore the setting of ON SHUTDOWN
*-------------------------------------
	lcOnShutdown = .cOldOnShutdown
	on shutdown &lcOnShutdown

	.ReleaseSplash()
	.ReleaseToolbar()
	.ReleaseMenu()
	.ShowVFPToolbars()
	.ReleaseDesktopImage()
	.ReleaseChildren()

	.ReleaseGlobalEnvironmentObj()

*--- If the Connection Manager exists, release it
	if vartype(.oConnectionMgr) == "O"
		.oConnectionMgr.release()
	endif

	.oErrorMgr = .null.

*--------------------------------------------------
*-- Indicates that the Cleanup method has already
*-- been run.
*--------------------------------------------------
	.lIsClean = .t.
	_screen.mousepointer = MOUSE_DEFAULT
	close data all
	clear events
	clear program
	if wexist('Report Designer')
		release windows 'Report Designer' && try to close report preview window		
		=MESSAGEBOX(wexist('Report Designer'))
	endif
endwith
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform