[vtkusers] vtkCollection API documentation suggestion
    N Smethurst 
    nick.smethurst at free.fr
       
    Mon Oct 13 07:19:34 EDT 2003
    
    
  
Since I just spent a while working this one out, I thought it would be wise 
to include a note in the documentation of this class, specifically in the 
IsItemPresent(vtkObject*) method.
If I am correct, vtkCollection uses 0-indexing. However, this method uses 
1-indexing! Hence using a position int obtained from:
int pos = IsItemPresent(vtkObject*);
later on with:
vtkObject* GetItemAsObject(pos);
needs a decrement:
vtkObject* GetItemAsObject(pos-1);
I thought it would be worth noting this in the API documentation since there 
is no mention of it (other than in the code itself of course).
Nic
    
    
More information about the vtkusers
mailing list