Changeset 60 for trunk/Forms


Ignore:
Timestamp:
Dec 3, 2014, 10:45:24 PM (10 years ago)
Author:
chronos
Message:
  • Added: Free Pascal Compiler as supported target.
  • Added: Log window to examine output from background execute compilers.
  • Fixed: Execution of targets except Java target.
Location:
trunk/Forms
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.lfm

    r59 r60  
    889889        }
    890890      end
     891      object MenuItem19: TMenuItem
     892        Action = AViewLog
     893      end
    891894      object MenuItem30: TMenuItem
    892895        Action = AViewCompilers
     
    10761079      Caption = 'Show execution point'
    10771080      OnExecute = AProgramShowExecutionPointExecute
     1081    end
     1082    object AViewLog: TAction
     1083      Category = 'View'
     1084      Caption = 'Log'
     1085      OnExecute = AViewLogExecute
    10781086    end
    10791087  end
  • trunk/Forms/UFormMain.lrt

    r59 r60  
    3737TMAINFORM.ASHOWSOURCEPOSITION.CAPTION=Show position in source
    3838TMAINFORM.APROGRAMSHOWEXECUTIONPOINT.CAPTION=Show execution point
     39TMAINFORM.AVIEWLOG.CAPTION=Log
  • trunk/Forms/UFormMain.pas

    r59 r60  
    1616
    1717  TMainForm = class(TForm)
     18    AViewLog: TAction;
    1819    AProgramShowExecutionPoint: TAction;
    1920    AShowSourcePosition: TAction;
     
    5152    MenuItem17: TMenuItem;
    5253    MenuItem18: TMenuItem;
     54    MenuItem19: TMenuItem;
    5355    MenuItem2: TMenuItem;
    5456    MenuItem22: TMenuItem;
     
    133135    procedure AViewCompilersExecute(Sender: TObject);
    134136    procedure AViewInterpretterExecute(Sender: TObject);
     137    procedure AViewLogExecute(Sender: TObject);
    135138    procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
    136139    procedure FormCreate(Sender: TObject);
     
    140143  private
    141144    FCurrentTarget: TTarget;
     145    procedure TargetLogExecute(Lines: TStrings);
    142146    procedure SetCurrentTarget(AValue: TTarget);
    143147    procedure AProjectOpenRecentExecute(Sender: TObject);
     
    169173uses
    170174  UCore, UFormCPU, UFormOptions, UFormMessages, UFormTargets, UFormOutput, UFormInput,
    171   UFormMemory, UFormSourceCode, UFormTargetCode, UTargetInterpretter;
     175  UFormMemory, UFormSourceCode, UFormTargetCode, UTargetInterpretter, UFormLog;
    172176
    173177resourcestring
     
    189193  for I := 0 to Core.Targets.Count - 1 do
    190194    TTarget(Core.Targets[I]).OnChangeState := nil;
    191   FCurrentTarget.OnChangeState := TargetStateChanged;
    192   FCurrentTarget.Messages.OnChange := MessagesChanged;
     195  if Assigned(FCurrentTarget) then begin
     196    FCurrentTarget.OnChangeState := TargetStateChanged;
     197    FCurrentTarget.OnLog := TargetLogExecute;
     198    FCurrentTarget.Messages.OnChange := MessagesChanged;
     199  end;
    193200  UpdateTargetList;
    194201  UpdateInterface;
     
    218225  FormOutput.Reload;
    219226  FormMemory.Reload;
     227end;
     228
     229procedure TMainForm.TargetLogExecute(Lines: TStrings);
     230begin
     231  FormLog.Memo1.Lines.AddStrings(Lines);
    220232end;
    221233
     
    438450end;
    439451
     452procedure TMainForm.AViewLogExecute(Sender: TObject);
     453begin
     454  FormLog.Show;
     455end;
     456
    440457procedure TMainForm.FormCloseQuery(Sender: TObject; var CanClose: boolean);
    441458begin
Note: See TracChangeset for help on using the changeset viewer.