Ignore:
Timestamp:
Nov 10, 2010, 9:42:27 AM (14 years ago)
Author:
george
Message:
  • Added: Parsing type parameters.
  • Fixed: Saving edited files.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IDE/Forms/UCodeForm.pas

    r21 r24  
    1919    procedure SynEditSourceChange(Sender: TObject);
    2020  private
    21     { private declarations }
     21    FProjectFile: TProjectFile;
     22    procedure SetProjectFile(const AValue: TProjectFile);
    2223  public
    23     ProjectFile: TProjectFile;
     24    property ProjectFile: TProjectFile read FProjectFile write SetProjectFile;
     25    procedure Save;
    2426  end;
    2527
     
    4143end;
    4244
     45procedure TCodeForm.SetProjectFile(const AValue: TProjectFile);
     46begin
     47  if FProjectFile = AValue then Exit;
     48  FProjectFile := AValue;
     49  if Assigned(AValue) then
     50    SynEditSource.Lines.Assign(FProjectFile.Source)
     51    else SynEditSource.ClearAll;
     52end;
     53
     54procedure TCodeForm.Save;
     55begin
     56  if Assigned(ProjectFile) then
     57    ProjectFile.Source.Assign(SynEditSource.Lines);
     58end;
     59
    4360end.
    4461
Note: See TracChangeset for help on using the changeset viewer.