Forum > LCL

TListItem ListIndex(0) out of Bounds

(1/1)

BlueIcaro:
Hello, I got this error, when I try to add item to TListItem, using Object inspector, algo during runtime, with this code:

--- Quote ---procedure TForm1.Button1Click (Sender: TObject );
Var
 MiITem : TListItem;
begin
  MiItem := TListItem.Create(ListView1.Items);
   MiItem.Caption:=Edit1.Text;
   ListView1.Items.AddItem(MiItem);

end;         
--- End quote ---

But The items, after the error, is show in the TListView.

My Lazarus is: 0.9.29 SVN: 27113, FPC 2.4.3

/BLueIcaro

BlueIcaro:
I found that is a bug reported
http://bugs.freepascal.org/view.php?id=17263

I'll donwload the last snapshot.

/BlueIcaro

BlueIcaro:
Well, The problem it's out.

By I don't search throught the bugtracker  :-[

/BlueIcaro

Navigation

[0] Message Index

Go to full version