indexof method
Posted: 06 Apr 2011, 11:56
i wrote following code:
<<<<
EntIndx := cadEditorControl1.Image.CurrentLayout.Entities.IndexOf(entPt);
>>>>
it gave true (expected) result for first two execution.
It gave exception, in case of entity is deleted. (i've used try.. catch for that)
But for one entity, though it was deleted, it gave index of that entity.
I think, there is some reload or redraw / refreshing required.
Does it?
what can be possibility for wrong index no?
<<<<
EntIndx := cadEditorControl1.Image.CurrentLayout.Entities.IndexOf(entPt);
>>>>
it gave true (expected) result for first two execution.
It gave exception, in case of entity is deleted. (i've used try.. catch for that)
But for one entity, though it was deleted, it gave index of that entity.
I think, there is some reload or redraw / refreshing required.
Does it?
what can be possibility for wrong index no?