Yes, a List will automatically "grow" when new objects are added. However, you can still get an IndexOutOfBoundsException if you try to do a list.get(i) and i is a value greater then or equal to list.size(). So, if your list has one object in it and you did list.get(1), you'd get an IndexOutOfBoundsException because list.get(1) assumes there are at least 2 objects in the list.
It's hard to tell exactly what your code is doing since it's in a different language, but this part of the code looks like the culprit:
I believe the second conditional should be rewritten like this:
Try that out, and let us know if you're still having trouble.
Blake Minghelli<br />SCWCD<br /> <br />"I'd put a quote here but I'm a non-conformist"
Joined: Mar 27, 2004
hi Blake, you were right! you saw the problem ^^ ...
but it was me that forgot a silly thing. i should use on both:
thats why i defined a variable (int i = 0).
and i found out that to use "while" on the first, will totally give me no problems ^^-..