Your code will work if you first initialised the whole array to Nil
FillChar (myArray, sizeof (myArray), #0);
Make sure you also Nil out the cell once an object has been removed.
----- Original Message -----
From: "Gajo Istvan" <[EMAIL PROTECTED]>
> Hi,
> I have an array of TObjects. A cell of the array may not have been
created,
> so I want to check if it exists or not. This doesn't work:
> if myArray[i] = nil then ShowMessage('Object doesn't exist')
>
> What should I do?
> Gajo
_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi