Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Upgrading to VFP9
Message
From
14/11/2007 13:03:38
 
 
To
14/11/2007 12:43:27
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01268930
Message ID:
01268935
Views:
12
>I'm trying to rein-in my coworkers from building and releasing our production EXE's without doing full regression testing first. They do a build then when they try a couple things and it doesn't bomb, they think we are good to go. I come from a different school. Any thoughts on this? Oh, I have seen one error about VFP9 thinking that a file that is not opened exclusively needs to be, but they think that may just be an environmental setting, but maybe I'll save that for another thread.

Jay,

You can release it reasonably fast - I know I'll get a load of don't do this, but still here it comes

Any changes you need for vfp9, can be done at your own pace

(1) put somewhere in your base include file
&& Version.h

#define VERSION_OF_WINDOWS	(eval(ltrim(substr(os(), at(' ', os())))))

#define	WIN95_VERSION		4.00
#define	WIN98_VERSION		4.10
#define	WINME_VERSION		4.90
#define	WIN2K_VERSION		5.00
#define	WINXP_VERSION		5.01
#define	WIN2003_VERSION		5.02
#define	WINVISTA_VERSION	6.00

#define	WIN98_OR_HIGHER		(VERSION_OF_WINDOWS >= WIN98_VERSION)
#define	WIN2K_OR_HIGHER		(VERSION_OF_WINDOWS >= WIN2K_VERSION)
#define	WINXP_OR_HIGHER		(VERSION_OF_WINDOWS >= WINXP_VERSION)
#define	WINVISTA_OR_HIGHER	(VERSION_OF_WINDOWS >= WINVISTA_VERSION)
*-----------------------------------------------------------------------
#define	VFP_9	(Version(5) >= 900)
*-----------------------------------------------------------------------
(2) in the initialisation of your application
	=Vista_Init()

function Vista_Init()

	local sError
	sError = on('Error')
	private declareError
	declareError = FALSE
	on error declareError = TRUE
	
	DECLARE integer GdiSetBatchLimit IN WIN32API integer
	=GdiSetBatchLimit(1)
	
	on error &sError
	
	return !m.declareError

endfunc
(3) add this where you init every datasession - including the default
This is done with macrosubsitution, in order to not need to recompile each time
do case
	case !VFP_9
	
	otherwise
		local cmd

		
		cmd= 'set TableValidate to 0'
		&cmd
		
		cmd= 'set tableprompt off'
		&cmd
	
		cmd= 'set enginebehavior 70'  && may not need this
		&cmd
		
		cmd= 'set reportbehavior 80'  && may not need this
		&cmd
	endcase
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform