G
Guest
Hi,
I've got an array of a class say dim mydogs(50) of dog
I create an instance of a dog mydogs(0) = new mydogs("milo")
That all works fine. However I want to search the array for a dog named
Fido. When I get to an array element that hasn't been created I get an
error. I understand why this happens, the object hasn't been created, just
declared.
Is there some way to say:
if mydogs(0)."has been created" then
if mydogs(0).name = "Fido" then found = true
end if
If there's a better way to accomplish the task I would be all happy to try it.
Thanks,
Ron
I've got an array of a class say dim mydogs(50) of dog
I create an instance of a dog mydogs(0) = new mydogs("milo")
That all works fine. However I want to search the array for a dog named
Fido. When I get to an array element that hasn't been created I get an
error. I understand why this happens, the object hasn't been created, just
declared.
Is there some way to say:
if mydogs(0)."has been created" then
if mydogs(0).name = "Fido" then found = true
end if
If there's a better way to accomplish the task I would be all happy to try it.
Thanks,
Ron