From f021024b4f5b867a5a0aa46746934a2e1b851a2f Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Wed, 31 May 2017 11:22:24 +0200 Subject: [PATCH] close #144- Runnables, run compiled file - better message for unsaved files --- src/ce_main.pas | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ce_main.pas b/src/ce_main.pas index 3cc068cf..56deaf89 100644 --- a/src/ce_main.pas +++ b/src/ce_main.pas @@ -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;