|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Getting the deleted elementI would like to get the deleted element inside my listener. But it seems thet ListEvent.getIndex() does not return the deleted element, as it has already been removed from the list when the listener is called.
Is there a way to get the item before its deletion? Thanks, Phil |
|
|
Re: Getting the deleted elementPhil, unfortunately at the moment, the only way to access a deleted element is to maintain a private ArrayList inside of your ListEventListener. It essentially acts as a cache of the source list.
Inelegant, but it'll keep you moving forward.... James On Wed, Jul 2, 2008 at 5:28 AM, philk <phil.kursawe@...> wrote:
|
|
|
Re: Getting the deleted elementOuch that is a pity. I guess thats due to performance optimizations?
Thanks for your quick response James, as always :)
|
|
|
Re: Getting the deleted elementPhil, I'm afraid not. It's due to short-sightedness in the early days of GL. GL 2.0 is/was supposed to introduce deleted elements right into the ListEvent, but retrofitting this ability into all of our existing EventList implementations has been tremendously difficult. We completed about 70% of the EventLists but work on that has been stopped for a while as the remaining Lists are really difficult to modify without breaking other stuff.
James On Wed, Jul 2, 2008 at 9:42 AM, philk <phil.kursawe@...> wrote:
|
| Free Forum Powered by Nabble | Forum Help |