> Of course, if its an array of TBitmap, you're not shuffling large lumps of
> data - you're shuffling pointers to bitmaps.
> I'd go for a TList myself. If I was really keen I'd override the Items[]
> property to get & set TBitmaps instead of pointers so I didn't have to
> typecast in calling code.
I find that the effort in wrapping TList is enough to warrant writing a dynamic array
wrapper since this is essentially what tlist is anyway.
I'd write the wrapper as TAbstractObjectList with a protected abstract virtual
function Accepts(Obj :TObject):Boolean to control adding to the list and
provide protected retrieval functions so that a derived list can add an Items
array property with as little effort as possible. It also might be nice to implement
the dynamic array as growing in quantities indicated by an virtual function
Growth:Integer that by default returns 1. Add a Pack procedure and an AutoPack
property and OwnsContents property and the list does most useful functions.
Possibly a Sort using a virtual CompareObject(A,B :TObject):Integer might be in
order (No pun intended)...
--
Aaron Scott-Boddendijk
Jump Productions
(07) 838-3371 Voice
(07) 838-3372 Fax
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz