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 objects of these classes in a TList. > But, when it comes to manipulate or destroy these items, I am in trouble: I > have lost the information about the precise type of the object the pointer > points to. > > Does somebody have an idea? Use TObjectlist from contnrs.pas Michael. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal