new Component with TCollection cannot edit in OI lazarus / 31-LCL ---------------------------------------------------------------------- webcss · 2010-08-27 19:18 Hi, I've created a new nonvisual TComponent descent with a TCollection descent. Collection is a published property of my component. When I drop the component on a form and try to edit the collection, Error "Collection=nil" shows. Collection is created in component's constructor. What am I doing wrong? ---------------------------------------------------------------------- Blaazen · 2011-03-26 03:11 Because I saw the same error and I found this post without reply I give here explanation. This error simply happens when TCollection is not created. Example: If declaration is like this: Code: [Select]TItem = class (...)   ... TItems = class (TCollection)   ... TMyComponent = class (TComponent)   FItems: TItems;   ...   constructor Create;   ... then constructor must be like this: Code: [Select]constructor TMyComponent.Create; begin   inherited Create;   FItems:=TCollection.Create(TItem);  //error occurs without this line end;