Changeset 3 for trunk/UMainForm.pas


Ignore:
Timestamp:
Feb 9, 2012, 1:25:43 PM (12 years ago)
Author:
chronos
Message:
  • Fixed: Now "Hello world" example is correctly interpretted.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        11lib
         2LazFuckIDE.exe
  • trunk/UMainForm.pas

    r2 r3  
    5252    ToolButton6: TToolButton;
    5353    ToolButton7: TToolButton;
     54    procedure AExitExecute(Sender: TObject);
    5455    procedure ARunExecute(Sender: TObject);
    5556    procedure FormCreate(Sender: TObject);
     57    procedure FormDestroy(Sender: TObject);
    5658    procedure FormShow(Sender: TObject);
    5759  private
     
    8183begin
    8284  BrainFuckInterpreter := TBrainFuckInterpreter.Create;
    83   BrainFuckInterpreter.Source := MemoSource.Lines;
     85end;
     86
     87procedure TMainForm.FormDestroy(Sender: TObject);
     88begin
     89  BrainFuckInterpreter.Free;
    8490end;
    8591
     
    8793begin
    8894  InterpreterForm.Show;
    89   BrainFuckInterpreter.Input := InterpreterForm.MemoInput.Lines;
    90   BrainFuckInterpreter.Output := InterpreterForm.MemoOutput.Lines;
     95  BrainFuckInterpreter.Input := InterpreterForm.MemoInput.Lines.Text;
     96  BrainFuckInterpreter.Source := MemoSource.Lines.Text;
    9197  BrainFuckInterpreter.Run;
     98  InterpreterForm.MemoOutput.Lines.Text := BrainFuckInterpreter.Output;
     99end;
     100
     101procedure TMainForm.AExitExecute(Sender: TObject);
     102begin
     103  Close;
    92104end;
    93105
Note: See TracChangeset for help on using the changeset viewer.