Changeset 34 for trunk/Forms


Ignore:
Timestamp:
Feb 18, 2012, 11:17:14 PM (13 years ago)
Author:
chronos
Message:
  • Removed: Action Compile and run. Now Compile is executed before Run action if not compiled yet.
Location:
trunk/Forms
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UMainForm.lfm

    r33 r34  
    455455        }
    456456      end
    457       object MenuItem31: TMenuItem
    458         Action = ACompileAndRun
    459       end
    460457      object MenuItemTarget: TMenuItem
    461458        Caption = 'Target'
     
    788785      ShortCut = 16504
    789786    end
    790     object ACompileAndRun: TAction
    791       Caption = 'Compile and run'
    792       OnExecute = ACompileAndRunExecute
    793     end
    794787    object AProgramRun: TAction
    795788      Category = 'Program'
  • trunk/Forms/UMainForm.lrt

    r33 r34  
    1818TMAINFORM.AEXIT.CAPTION=Exit
    1919TMAINFORM.APROGRAMCOMPILE.CAPTION=Compile
    20 TMAINFORM.ACOMPILEANDRUN.CAPTION=Compile and run
    2120TMAINFORM.APROGRAMRUN.CAPTION=Run
    2221TMAINFORM.AABOUT.CAPTION=About
  • trunk/Forms/UMainForm.pas

    r33 r34  
    2323    AAbout: TAction;
    2424    ABreakpointToggle: TAction;
    25     ACompileAndRun: TAction;
    2625    AViewCompilers: TAction;
    2726    AGenerateNumber: TAction;
     
    7372    MenuItem29: TMenuItem;
    7473    MenuItem30: TMenuItem;
    75     MenuItem31: TMenuItem;
    7674    MenuItem32: TMenuItem;
    7775    MenuItem33: TMenuItem;
     
    113111    ToolButton9: TToolButton;
    114112    procedure ABreakpointToggleExecute(Sender: TObject);
    115     procedure ACompileAndRunExecute(Sender: TObject);
    116113    procedure AProgramCompileExecute(Sender: TObject);
    117114    procedure AExitExecute(Sender: TObject);
     
    376373    TTargetInterpretter(CurrentTarget).Input := InterpreterForm.MemoInput.Lines.Text;
    377374  CurrentTarget.SourceCode := MemoSource.Text;
     375  if not CurrentTarget.Compiled then CurrentTarget.Compile;
    378376  CurrentTarget.Run;
    379377end;
     
    502500end;
    503501
    504 procedure TMainForm.ACompileAndRunExecute(Sender: TObject);
    505 begin
    506   with CurrentTarget do begin
    507     Optimization := coNormal;
    508     SourceCode := MemoSource.Text;
    509     ProgramName := ExtractFileNameOnly(ProjectFileName);
    510     ProjectFileName := Self.ProjectFileName;
    511     Compile;
    512     CompileToFile;
    513     if CompiledExtension <> '' then Run;
    514   end;
    515 end;
    516 
    517502procedure TMainForm.AProgramPauseExecute(Sender: TObject);
    518503begin
Note: See TracChangeset for help on using the changeset viewer.