[fpc-pascal] Heterogenous list of objects

2008-01-22 Thread g . marcou
Hi, I'd like to manage a list of heterogenous objects. For instance, I have a list of objects to buy in store: cheeses (of class TCheese), soaps (of class TSoap), flowers (of class TFlower), etc... I thought to gather pointers to different objects of these classes in a TList. But, when

Re: [fpc-pascal] Heterogenous list of objects

2008-01-22 Thread Damien Gerard
On Jan 22, 2008, at 11:22 AM, [EMAIL PROTECTED] wrote: Hi, I'd like to manage a list of heterogenous objects. For instance, I have a list of objects to buy in store: cheeses (of class TCheese), soaps (of class TSoap), flowers (of class TFlower), etc... I thought to gather pointers to

Re: [fpc-pascal] Heterogenous list of objects

2008-01-22 Thread Michael Van Canneyt
On Tue, 22 Jan 2008, [EMAIL PROTECTED] wrote: Hi, I'd like to manage a list of heterogenous objects. For instance, I have a list of objects to buy in store: cheeses (of class TCheese), soaps (of class TSoap), flowers (of class TFlower), etc... I thought to gather pointers to different

Re: Re: [fpc-pascal] Heterogenous list of objects

2008-01-22 Thread g . marcou
Hi all, thanks for your kind and fast answer. Effectively, TObjectList is what I need. Thanks to Damien, I understand a bit better how it works. But in my case I believe that I need to use some kind of TList of TObjectList. So is it possible to build a class that will have TObjecList