Changeset 75 for trunk/IDE/Forms/FormMessages.pas
- Timestamp:
- Jun 4, 2024, 12:22:49 AM (5 months ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/IDE/Forms/FormMessages.pas
r74 r75 1 unit UFormMessages; 2 3 {$mode objfpc}{$H+} 1 unit FormMessages; 4 2 5 3 interface … … 7 5 uses 8 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 ComCtrls, UProject, UCompiler;7 ComCtrls, Project, Compiler; 10 8 11 9 type 10 TSelectFileEvent = procedure(FileName: string; Position: TPoint); 12 11 13 12 { TFormMessages } … … 15 14 TFormMessages = class(TForm) 16 15 ListView1: TListView; 17 procedure ListBoxMessagesSelectionChange(Sender: TObject; User: boolean);16 procedure ListBoxMessagesSelectionChange(Sender: TObject; User: Boolean); 18 17 procedure ListView1Click(Sender: TObject); 19 18 procedure ListView1Data(Sender: TObject; Item: TListItem); … … 21 20 Selected: Boolean); 22 21 private 23 { private declarations }22 FOnSelectFile: TSelectFileEvent; 24 23 public 25 24 procedure Reload; 25 property OnSelectFile: TSelectFileEvent read FOnSelectFile write FOnSelectFile; 26 26 end; 27 27 28 var29 FormMessages: TFormMessages;30 28 31 29 implementation … … 34 32 35 33 uses 36 UCore, UFormMain, UFormSourceCode;34 Core, FormMain, FormSourceCode; 37 35 38 36 { TFormMessages } 39 37 40 38 procedure TFormMessages.ListBoxMessagesSelectionChange(Sender: TObject; 41 User: boolean);39 User: Boolean); 42 40 begin 43 44 41 end; 45 42 … … 52 49 procedure TFormMessages.ListView1Data(Sender: TObject; Item: TListItem); 53 50 begin 54 with Core , FormMain, FormSourceCodedo51 with Core.Core, FormMain.FormMain do 55 52 with TErrorMessage(Compiler.ErrorMessages[Item.Index]) do begin 56 53 if FileName = '' then Item.Caption := ' ' … … 68 65 P: TPoint; 69 66 begin 70 with Core , FormSourceCode do67 with Core.Core do 71 68 if Assigned(ListView1.Selected) then 72 69 with TErrorMessage(ListView1.Selected.Data) do 73 70 if FileName <> '' then begin 74 ProjectFile := Project.Files.SearchFile(FileName); 75 if Assigned(ProjectFile) then 76 SynEditSource.Lines.Assign(ProjectFile.Source) 77 else if FileExists(FileName) then 78 SynEditSource.Lines.LoadFromFile(FileName); 79 SynEditSource.CaretXY := Position; 80 TForm(SynEditSource.Owner).Show; 81 SynEditSource.SetFocus; 71 if Assigned(FOnSelectFile) then 72 FOnSelectFile(FileName, Position); 82 73 end; 83 74 end; … … 85 76 procedure TFormMessages.Reload; 86 77 begin 87 ListView1.Items.Count := Core.Co mpiler.ErrorMessages.Count;78 ListView1.Items.Count := Core.Core.Compiler.ErrorMessages.Count; 88 79 ListView1.Refresh; 89 80 end;
Note:
See TracChangeset
for help on using the changeset viewer.