On Sun, Jul 06, 2003 at 04:25:15PM +0200, Marco van de Voort wrote:
Is there an example of using TCollection or something (without having to
write the code myself) that manages a collection of FPC style classes
(objects) ?
I'd like to see one, code I have written to handle a dynamic
IIRC, TCollection only stores TCollectionItem derived classes.
TList is closer to what you want probably.
Is there an example other than list.pp in the fcl source ?
Also just for the record of knowing... I have attached datanicks.pas
which hold a dynamic array of TNick ... Is this
On Sun, Jul 06, 2003 at 05:11:17PM +0200, Marco van de Voort wrote:
which hold a dynamic array of TNick ... Is this what TList already does
(if so I'm wasting my time writing my own code...) ?
Pretty much yes, but in a class wrapper. You can add and remove items,
iterate through them
On Sun, Jul 06, 2003 at 05:31:59PM +0200, Marco van de Voort wrote:
On Sun, Jul 06, 2003 at 05:11:17PM +0200, Marco van de Voort wrote:
which hold a dynamic array of TNick ... Is this what TList already does
(if so I'm wasting my time writing my own code...) ?
Pretty much yes, but
Actually Michael,
Could you possibly spare 5 mins and give a really simple example of a
TList descandent ? I'm a tad confused here, (too slowly getting
anywhere)...
Thank you :)
cheers
James
___
fpc-pascal maillist - [EMAIL PROTECTED]
Why not use a TObjectList?? IIRC that is available. In unit Contnrs.pas. It
will do a lot more for you. It can 'own' the objects, and therefore free you
from needing to manage them.
Simple descendent (typed at speed, with no testing):
N.B. This is a WRAPPER because it allows the programmer more
On Sun, Jul 06, 2003 at 10:38:28PM +0100, Matt and Lisa Emson wrote:
Why not use a TObjectList?? IIRC that is available. In unit Contnrs.pas. It
will do a lot more for you. It can 'own' the objects, and therefore free you
from needing to manage them.
Simple descendent (typed at speed, with