Changeset 59 for branches/Transpascal/Forms/UMainForm.pas
- Timestamp:
- Oct 14, 2010, 8:41:34 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Transpascal/Forms/UMainForm.pas
r55 r59 37 37 procedure UpdateProjectTree; 38 38 procedure UpdateProjectGroup(Node: TTreeNode; Group: TProjectGroup); 39 function GetSource(Name: string; Source: TStringList): Boolean; 39 40 public 40 41 Project: TProject; … … 80 81 // Compile all project files 81 82 Compiler.Init; 82 for I := 0 to Project.Items.Count - 1 do begin 83 if TProjectNode(Project.Items[I]) is TProjectFile then 84 with TProjectFile(Project.Items[I]) do begin 85 Compiler.Compile(Parent.GetDir + Name, Source, ProducedCode); 86 end; 83 Compiler.Parser.OnGetSource := GetSource; 84 with TProjectFile(Project.Items[0]) do begin 85 Compiler.Compile(Parent.GetDir + Name, Source, ProducedCode); 87 86 end; 88 87 … … 179 178 end; 180 179 180 function TMainForm.GetSource(Name: string; Source: TStringList): Boolean; 181 var 182 FileName: string; 183 begin 184 FileName := Project.GetDir(True) + Name + '.pas'; 185 if FileExists(FileName) then begin 186 Source.LoadFromFile(FileName); 187 Result := True; 188 end else Result := False; 189 end; 190 181 191 procedure TMainForm.FormClose(Sender: TObject; var Action: TCloseAction); 182 192 begin
Note:
See TracChangeset
for help on using the changeset viewer.