Use something like

        If NOT Assigned(myArray[i]) then ShowMessages('Not Created Yet')


As an alternative, a better solution is as already posted a TList


Jason Saggers
ESecure Team
Expert Solution Providers 
-----Original Message-----
From: Gajo Istvan [mailto:[EMAIL PROTECTED] 
Sent: Friday, 10 September 2004 6:24 a.m.
To: [EMAIL PROTECTED]
Subject: [DUG] How can I check if an object exists?

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



_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to