Ignore:
Timestamp:
Jul 15, 2023, 12:51:15 AM (16 months ago)
Author:
chronos
Message:
  • Modified: Removed U prefix from unit names.
  • Fixed: Memory leaks.
File:
1 moved

Legend:

Unmodified
Added
Removed
  • branches/CpuSingleSize/Forms/FormMessages.pas

    r237 r238  
    1 unit UFormMessages;
     1unit FormMessages;
    22
    33interface
     
    77
    88type
     9  TSelectEvent = procedure (Position: TPoint) of object;
    910
    1011  { TFormMessages }
     
    1516    procedure ListView1DblClick(Sender: TObject);
    1617  private
     18    FOnSelect: TSelectEvent;
    1719  public
    1820    procedure Reload;
     21    property OnSelect: TSelectEvent read FOnSelect write FOnSelect;
    1922  end;
    20 
    21 var
    22   FormMessages: TFormMessages;
    2323
    2424
     
    2828
    2929uses
    30   UCore, UMessages, UFormAssembler;
     30  Core, Message, FormAssembler;
    3131
    3232{ TFormMessages }
     
    3434procedure TFormMessages.ListView1Data(Sender: TObject; Item: TListItem);
    3535begin
    36   with Core.Assembler do
    37   if (Item.Index >= 0) and (Item.Index < Messages.Count) then
    38   with TMessage(Messages[Item.Index]) do begin
     36  with Core.Core.Assembler do
     37  if (Item.Index >= 0) and (Item.Index < Message.Count) then
     38  with TMessage(Message[Item.Index]) do begin
    3939    Item.Caption := IntToStr(Position.X) + ', ' + IntToStr(Position.Y);
    40     Item.Data := Messages[Item.Index];
     40    Item.Data := Message[Item.Index];
    4141    Item.SubItems.Add(Text);
    4242  end;
     
    4646begin
    4747  if Assigned(ListView1.Selected) then begin
    48     FormAssembler.SynEdit1.CaretXY := TMessage(ListView1.Selected.Data).Position;
    49     FormAssembler.SynEdit1.SetFocus;
    50     FormAssembler.Show;
     48    if Assigned(FOnSelect) then
     49      FOnSelect(TMessage(ListView1.Selected.Data).Position);
    5150  end;
    5251end;
     
    5453procedure TFormMessages.Reload;
    5554begin
    56   ListView1.Items.Count := Core.Assembler.Messages.Count;
     55  ListView1.Items.Count := Core.Core.Assembler.Message.Count;
    5756  ListView1.Refresh;
    5857end;
    5958
    60 
    6159end.
    6260
Note: See TracChangeset for help on using the changeset viewer.