I am using lazarus trunk (Lazarus 2.1.0 r59168 FPC 3.0.4 x86_64-darwin-cocoa (alpha)).
I am not able to place a TListVIew on a form.
If I select a TListView from component palette and try to place it on a form I get "Error moving component ListView1: TListView"
I can create a TListView at runtime but I get "SIGABRT" if I add items to listview. And I get SIGSEGV on ItemFocused.MakeVisible(true);
See code below
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ComCtrls, StdCtrls;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
_listview: TListView;
public
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
begin
_listview.Items.Add();
_listview.Items.Add(); // <<-- SIGABRT here
// it raise sigsegv on the next line if previous line is commented
_listview.ItemFocused.MakeVisible(true);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
_listview:= TListView.Create(Self);
_listview.Align:= alClient;
_listview.Parent:= form1;
end;
end.
I don't know if this bug is present in lazarus rc 2.0