Ignore:
Timestamp:
May 6, 2019, 11:03:00 AM (6 years ago)
Author:
chronos
Message:
  • Added: TargetCode form use SynEdit for syntax highlighting.
  • Fixed: Do not show error if specific target doesn't have assigned compiler. Not all targets use compiler. Some of them are just interpreted.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormSourceCode.pas

    r105 r106  
    3636    MenuItem6: TMenuItem;
    3737    PopupMenuSource: TPopupMenu;
    38     SynEdit1: TSynEdit;
     38    SynEditSource: TSynEdit;
    3939    SynJavaSyn1: TSynJavaSyn;
    4040    procedure AClearExecute(Sender: TObject);
     
    9191    for I := 0 to Number - 1 do
    9292      NumberText := NumberText + '+';
    93     SynEdit1.SelText := NumberText;
     93    SynEditSource.SelText := NumberText;
    9494  end;
    9595end;
     
    9797procedure TFormSourceCode.APasteFromClipboardExecute(Sender: TObject);
    9898begin
    99   SynEdit1.PasteFromClipboard;
     99  SynEditSource.PasteFromClipboard;
    100100end;
    101101
    102102procedure TFormSourceCode.ASelectAllExecute(Sender: TObject);
    103103begin
    104   SynEdit1.SelectAll;
     104  SynEditSource.SelectAll;
    105105end;
    106106
     
    114114  IndentText = '  ';
    115115begin
    116   Source := SynEdit1.Text;
     116  Source := SynEditSource.Text;
    117117  NewSource := '';
    118118  Indent := 0;
     
    130130      NewSource := NewSource + Source[I];
    131131  end;
    132   SynEdit1.Text := NewSource;
     132  SynEditSource.Text := NewSource;
    133133end;
    134134
    135135procedure TFormSourceCode.ACopyToClipboardExecute(Sender: TObject);
    136136begin
    137   SynEdit1.CopyToClipboard;
     137  SynEditSource.CopyToClipboard;
    138138end;
    139139
    140140procedure TFormSourceCode.ACutToClipboardExecute(Sender: TObject);
    141141begin
    142   SynEdit1.CutToClipboard;
     142  SynEditSource.CutToClipboard;
    143143end;
    144144
    145145procedure TFormSourceCode.AClearExecute(Sender: TObject);
    146146begin
    147   SynEdit1.Clear;
     147  SynEditSource.Clear;
    148148end;
    149149
     
    154154  I: Integer;
    155155begin
    156   Source := SynEdit1.Text;
     156  Source := SynEditSource.Text;
    157157  Pos := 1;
    158158  for I := 1 to Length(Source) do begin
     
    163163  end;
    164164  SetLength(Source, Pos - 1);
    165   SynEdit1.Text := Source;
     165  SynEditSource.Text := Source;
    166166end;
    167167
     
    169169begin
    170170  BFHighlighter := TSynBrainFuckHl.Create(nil);
    171   SynEdit1.Highlighter := BFHighlighter;
     171  SynEditSource.Highlighter := BFHighlighter;
    172172end;
    173173
Note: See TracChangeset for help on using the changeset viewer.