hemachandraa / gwt-examples

Automatically exported from code.google.com/p/gwt-examples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Removing items from the ListEditor has a bug

GoogleCodeExporter opened this issue · comments

What steps will reproduce the problem?
1. Initialize the ListEditor example with 3 or more items in the list.
2. Remove the first item in the list.
3. Remove the last item in the list.

What is the expected output? What do you see instead?

I expect to remove the last item in the list, but I get an array out of bound 
exception.

Please provide any additional information below.

The index to be remove is set during the initialization of the listeditor item 
editor and set to "final int index". Upon dispose and when setIndex is called, 
the index int is never updated on the remove callback. I solved the issues by 
adding a index field on the listeditor EmailsItemEditor to keep track of where 
it is in the list.

Original issue reported on code.google.com by ahtremb...@gmail.com on 6 Nov 2013 at 8:46