Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SET RESOURCE in cGlobalEnv (Bug?)
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
SET RESOURCE in cGlobalEnv (Bug?)
Miscellaneous
Thread ID:
00687501
Message ID:
00687501
Views:
71
Hi,

I experienced some strange behaviour when running an exe without a resource file. In CONFIG.FPW and CGlobalEnvironment I set RESOURCE=OFF, so the application ran without a resource file. When the application was terminated CGlobalEnvironment did a SET RESOURCE TO c:\windows\system32\foxuser.dbf, which is the VFP default foxuser file in an exe. This automatically set RESOURE=ON. To turn this behaviour off, I've put the IF around the following code and everything works fine now.
*   Library: CEnviron.vcx
*   Class:   CGlobalEnvironment
*   Method:  Reset()

*-------------------------------------------------------
*-- Set the resource file only if SET("RESOURCE") was
*-- OFF when the class was instantiated. Doing a 
*-- SET RESOURCE TO automatically sets SET RESOURCE ON.
*-------------------------------------------------------
IF this.cOldResource == "ON"
	luTemp = this.cOldResourceTo
	IF FILE(this.cOldResourceTo)
		* ...
	ENDIF
ENDIF
Regards,
Armin

Armin Neudert
Regional Director (Stuttgart) of German FoxPro User Group dFPUG

MCP for Visual FoxPro

Expert/Editor of the VFP section in the German Codezone community portal
Next
Reply
Map
View

Click here to load this message in the networking platform