At 06:56 PM 11/4/2008, Dennis McGrath wrote:
I see that 7.6 will now clean up scratch files on exit if it is
checked in settings.
Is there a way to have a compiled app do the same?
Currently, there is no setting to "Clean Scratch Files" for
R:Compiled applications.
However, there are at least two eloquent methods to achieve the same
goal for your
R:Compiled applications.
01. Add the following code at the end of your .DAT file that is used
to compile the
application.
-- Start
SET VAR vFolderAndFiles TEXT = NULL
SET VAR vFolderAndFiles = ((CVAL('SCRATCH'))+'\*.$$$')
SET ERROR MESSAGE 2262 OFF
SET ERROR MESSAGE 2263 OFF
SET ERROR MESSAGE 2926 OFF
DELETE &vFolderAndFiles
SET ERROR MESSAGE 2926 ON
SET ERROR MESSAGE 2263 ON
SET ERROR MESSAGE 2262 ON
CLEAR VARIABLE vFolderAndFiles
RETURN
-- End
02. Add/Update registry setting on local machine to "Clean Scratch files".
If you know how, you can add or unload the following existing registry
settings to any computer running the compiled application that will
enforce the "Clean Scratch files" settings. Don't try this at home <g>.
Start | Run | RegEdit | Registry Editor | HKEY_CURRENT_USER |
Software | R:BASE Technologies | RBG76 | Main Window
Name: Clean Scratch Files
Type: REG_DWORD
Data: 0x00000001 (1)
Having said that, a new PROPERTY command or Setting to "Clean Scratch Files"
for R:Compiled 7.6, 8.0, and 9.0 applications would be a nice enhancement in
upcoming "Update 5" for R:BASE 7.6, "Update 19" for Turbo V-8 and "Update 2"
for R:BASE eXtreme v9.0.
Very Best R:egards,
Razzak.