ArrayList.addItemAt() behaves like ArrayList.setItemAt()
- Dominant language
- ActionScript
- Stars
- 380
- Forks
- 120
- PR merge metrics
- No merged PRs in 30d
Description
In my working with ArrayLists I've found that addItemAt is **not** inserting a value, it is **setting** a value...
So:
```
var tableData:ArrayList = new ArrayList();
for( var x:int=0; x<100; x++) {
tableData.addItemAt( value[x], 0 );
}
```
Will produce an ArrayList of only 1 item at position 0...(presuming value is an array 100 length).
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the ArrayList.addItemAt() and ArrayList.setItemAt() entry points and compare their documented behavior. Reproduce the loop from the issue, then verify that repeated addItemAt(value[x], 0) retains all inserted values rather than replacing the item at position 0.
Written by the indexing model from the issue text.
Assessment
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100