Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GoApp is not an object
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01093988
Message ID:
01093995
Views:
30
>Naomi,
>
>Our print preview is modal so how are you able to get to the main toolbar? Sounds like maybe your ON ERROR routine isn't getting reset.
>
>-Dan
>
Dan,

Would you please elaborate on this? I think, we're not using it correctly. We're doing REPORT FORM myReport Preview and I think it's our problem. I was trying to find out why the menu is not restored, but to no avail yet. Here is our current application Cleanup code:
lparameters tlForceShutDown

local lcOnShutdown

_screen.mousepointer = MOUSE_HOURGLASS

*-----------------------------------
*--- Close all applications forms
*-----------------------------------
if wexist('Report Designer')
	release windows 'Report Designer' && try to close report preview window
endif

with this
	if not .oForms.CloseAllForms(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()

	.ShowVFPToolbars()

	.oErrorMgr = .null.
	.ReleaseMenu()

	.ReleaseDesktopImage()
	.ReleaseChildren()
	.ReleaseGlobalEnvironmentObj()

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

	close data all
	clear events

*--------------------------------------------------
*-- Indicates that the Cleanup method has already
*-- been run.
*--------------------------------------------------
	.lIsClean = .t.
	_screen.mousepointer = MOUSE_DEFAULT
	clear program
endwith
Would you please post how do you call preview for your reports, I think we need to incorporate it the same way. Also please check my other today's message about returning .f. from AddChildren. I already made the change in the cChildCollection.Init method.
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