<I><FONT COLOR="#663300">Hi Graeme,
<I><FONT COLOR="#663300">In cGlobalEnvironment.SetResource
IF this.cresource = "ON" SET RESOURCE OFF ELSE</FONT></I>
I can't find the above code in cGlobalEnvironment.SetResource. This is how my copy reads:
LOCAL luTemp
IF EMPTY(This.cResource) SET RESOURCE ON ELSE luTemp = This.cResource SET RESOURCE &luTemp ENDIF
*------------------------------------------------- *-- If the developer specified OFF, skip all other *-- SET RESOURCE commands. Otherwise, set the *-- desired resource file. *------------------------------------------------- &&&IF SET('RESOURCE') == "ON" &&& IF EMPTY(This.cResourceTo) &&& SET RESOURCE OFF &&& ELSE luTemp = This.cResourceTo IF FILE( luTemp ) SET RESOURCE TO &luTemp ELSE SET RESOURCE OFF IF This.lShowResourceFileErrorMessage MESSAGEBOX( "The resource file " + luTemp + " " + ; "could not be found. Ask the " + ; "application administrator to setup " + ; "your user account to point to a directory " + ; "that contains a valid Visual FoxPro " + ; "Resource file and try the application " + ; "again." ) ENDIF ENDIF ENDIF ENDIF
RETURN
</FONT></I>
sorry, I made the mistake of reporting that off the top of my head without the code in front of me and have suitably punished myself.
IF SET('RESOURCE') == "ON" IF EMPTY(This.cResourceTo) SET RESOURCE OFF ELSE is the current code - marked with &&& above.
so if resource is set ON in the first lines of the method, and then This.cResourceto is empty then the next part of the method sets it OFF again.
©2000 graeme thomson |