Dennis :
>>
I have a suggestion for those who want to use the QUIT TO syntax with
codelocked files and do not want the overhead of all those extra APX's.
After all, one of the advantages of codelocking is that the number of files
to distribute is small, usually just 1.
<<
I don't consider this as an advantage : when I have a minor change to send
thru EMail, it is more easy and much more rapid to have several APX.
For making my distribution support , I use command files with COPY *.APX A:
>>
create a file: QUITTOME.CMD containing the following:
RUN &vRunFile
RETURN
Use Codelock to make this into an APX say QUITTOME.APX
In your app you can put the command block to execute in the vRunFile
variable and quit to the QUITTOME.APX
SET VAR vRunFile = 'WHATEVER IN WHICHEVER.APX'
QUIT TO QUITTOME.APX
...
I have not tested this method, so those of you who wish this functionality
will have to experiment with it. Would be interested in knowing the
results
<<
I use a simlar method (except that I don't codelock QUITTOME.CMD) since 2
years (6.1a) without problem.
I wrote this CMD file (name should be launcher in english) :
-- lanceur.cmd
-- Ne pas codelocker
-- Lanc� par le programme apellant (QUIT TO lanceur.cmd) et ex�cute un
-- programme codelock� pour lib�rer la m�moire. Recoit de l'apellant :
-- . le nom du prog. codelock� � lancer (vnom),
-- . le nom du prog. apellant (vretour) auquel est retourn� le controle
apr�s ex�cution.
SET var vnom TEXT
SET var vretour TEXT
SET var vTEXT TEXT
If vnom IS NULL OR vretour IS NULL THEN
SET var vTEXT = ('Erreur LANCEUR.CMD : variables VNOM (' + .vnom +
+ ') et/ou VRETOUR (' + .vretour + ') non servie(s).')
-- 16 = 1 seul bouton, arr�t critique
SET var vTEXT = ('16|' + .Vcaption + '|' + .vTEXT)
SET VAR vTEXT = (UDF('@RMSG.DLL',.vTEXT))
QUIT
ENDIF
RUN &vnom
QUIT TO &vretour
Here is the code in the calling app (APEXP2.CMD) :
SET VAR vretour = 'apexp2.cmd'
SWITCH (.vpick11)
CASE '1' -- Mise � jour des D�clarants
SET VAR vnom = 'declarant IN apexp2.apx'
QUIT TO lanceur.cmd
BREAK
CASE '2' -- Mise � jour des Dossiers
.....
BREAK
ENDSW
So, when DECLARANT is run, the calling program is not resident anymore.
Only LANCEUR is resident (but very small).
DECLARANT ends with a RETURN command. Then memory is cleaned and control
returns to the calling program stored in vretour.
Of couse, vretour must not be clearred in the called programs ...
Works nice ... but as I can't make works QUIT TO ApxFileName, only parts of
my app is codelocked ...
J.M. GRATIAS, Logimatique, France