Re: [fpc-pascal] TFPObjectlist example

2020-09-08 Thread Sven Barth via fpc-pascal
James Richters via fpc-pascal schrieb am Di., 8. Sep. 2020, 20:07: > What’s the difference between TList and TFPGList? Which one is better > for this example? > The main difference is that TFPGList ist a generic, thus when you specialize it with your record you'll have a typesafe object where

Re: [fpc-pascal] TFPObjectlist example

2020-09-08 Thread James Richters via fpc-pascal
ionautomation.net> > , "FPC-Pascal users discussions" <mailto:fpc-pascal@lists.freepascal.org> > > Datum: 08.09.2020 16:21 > Předmět: Re: [fpc-pascal] TFPObjectlist example > __ > Od: "James Richt

Re: [fpc-pascal] TFPObjectlist example

2020-09-08 Thread Vojtěch Čihák via fpc-pascal
with it comfortably   MyList[1].Port:='abc';   V. __ Od: "Vojtěch Čihák via fpc-pascal" Komu: ja...@productionautomation.net, "FPC-Pascal users discussions" Datum: 08.09.2020 16:21 Předmět: Re: [fpc-pascal] T

Re: [fpc-pascal] TFPObjectlist example

2020-09-08 Thread Vojtěch Čihák via fpc-pascal
Hi,   I used TFPObjectList only once, for visual component TECAccordion (https://wiki.lazarus.freepascal.org/Eye-Candy_Controls#TECAccordion). Each item of list is derived from TWinControl so it is possible to use it even for visual components (like TCollection).   However, in your case

Re: [fpc-pascal] TFPObjectlist example

2020-09-06 Thread Ryan Joseph via fpc-pascal
> On Sep 7, 2020, at 6:07 AM, James Richters via fpc-pascal > wrote: > > Does anyone have an example of how to use TFPObjectlist? It just frees objects that are removed from the list (or when the list is freed). list:= TFPObjectlist.Create; list.Add(TObject.Create); list.Free; in that