close #144- Runnables, run compiled file - better message for unsaved files

This commit is contained in:
Basile Burg 2017-05-31 11:22:24 +02:00
parent d845d1ce3d
commit f021024b4f
No known key found for this signature in database
GPG Key ID: 1868039F415CB8CF
1 changed files with 6 additions and 2 deletions

View File

@ -3010,8 +3010,10 @@ var
older: boolean = false;
exist: boolean = false;
const
messg: string = 'Either the runnable does not exist or it is older than its source.' +
messg1: string = 'Either the runnable does not exist or it is older than its source.' +
LineEnding + 'Do you wish to recompile it ?';
messg2: string = 'The binary produced for a runnable that is not explicitly saved ' +
'must be recompiled after each execution.' + LineEnding + 'Do you wish to recompile it now ?';
begin
if fDoc.isNil then
exit;
@ -3024,7 +3026,9 @@ begin
end;
if (not exist) or (older) then
begin
if dlgYesNo(messg) = mrYes then
if fDoc.isTemporary and (dlgYesNo(messg2) = mrYes) then
compileRunnable
else if dlgYesNo(messg1) = mrYes then
compileRunnable
else if not exist then
exit;