Changeset 47 for trunk/IDE/Forms/UFormMain.pas
- Timestamp:
- Mar 4, 2012, 3:38:44 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IDE/Forms/UFormMain.pas
r46 r47 232 232 else Compiler.Analyzer.OnDebugLog := nil; 233 233 234 if Project. Items.Count > 0 then235 with TProjectFile(Project. Items[0]) do begin234 if Project.Files.Count > 0 then 235 with TProjectFile(Project.Files[0]) do begin 236 236 Compiler.SourceFiles.Clear; 237 Project. DumpFileList(Compiler.SourceFiles);238 Compiler.TargetFolder := Project.RootDir;237 Project.Files.DumpFileList(Compiler.SourceFiles); 238 Compiler.TargetFolder := ExtractFileDir(Project.FileName); 239 239 Compiler.Compile; 240 240 end; 241 FormProject.TreeViewProjectChange(Self, FormProject.TreeViewProject.Selected);241 //FormProject.TreeViewProjectChange(Self, FormProject.TreeViewProject.Selected); 242 242 FormMessages.Reload; 243 243 end; … … 283 283 F: TFileStream; 284 284 begin 285 FileName := Project.GetDir(True) + Name + '.pas';285 FileName := ExtractFileDir(Project.FileName) + Name + '.pas'; 286 286 if FileExists(FileName) then 287 287 try … … 302 302 begin 303 303 Title := ApplicationInfo.Name; 304 if Project. Name <> '' then Title := Project.Name + ' - ' + Title;304 if Project.FileName <> '' then Title := Project.FileName + ' - ' + Title; 305 305 if Project.Modified then Title := Title + ' *'; 306 306 Caption := Title; … … 557 557 558 558 procedure TFormMain.AProjectNewExecute(Sender: TObject); 559 var 560 NewFile: TProjectFile; 559 561 begin 560 562 AProjectClose.Execute; 561 563 Project.Active := True; 562 Project.Name := SNewProject; 564 Project.FileName := SNewProject; 565 Project.Files.AddFile('Unit1.pas'); 563 566 UpdateInterface; 564 567 end;
Note:
See TracChangeset
for help on using the changeset viewer.