Ignore:
Timestamp:
Aug 5, 2010, 1:17:35 PM (14 years ago)
Author:
george
Message:

Added separate unit for filling treeview with program source.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DelphiToC/UMainForm.pas

    r40 r41  
    88  SysUtils, Variants, Classes, Graphics, Controls, Forms,
    99  Dialogs, StdCtrls, UPascalSource, UPascalCompiler, UAssemblerSource,
    10   UCSource, ComCtrls;
     10  UCSource, ComCtrls, USourceTree;
    1111
    1212const
     
    3030  public
    3131    Compiler: TCompiler;
     32    SourceTree: TSourceTree;
    3233  end;
    3334
     
    4849  Compiler.SourceCode.Assign(Memo1.Lines);
    4950  Compiler.Compile;
    50   FillTreeView;
     51  SourceTree.TreeView := TreeView1;
     52  SourceTree.Code := Compiler.ProgramCode;
     53  SourceTree.Fill;
     54  //FillTreeView;
    5155  Memo2.Clear;
    5256  if Compiler.Producer is TAssemblerProducer then begin
     
    138142  Compiler := TCompiler.Create;
    139143  Compiler.OnErrorMessage := ErrorMessage;
     144  SourceTree := TSourceTree.Create;
    140145end;
    141146
    142147procedure TMainForm.FormDestroy(Sender: TObject);
    143148begin
    144   Compiler.Destroy;
     149  Compiler.Free;
     150  SourceTree.Free;
    145151end;
    146152
Note: See TracChangeset for help on using the changeset viewer.