FXIconList with frequent changes

Hi, I am writing an application where I add, remove and modify random
items of an FXIconList quite frequently. The only possible way i know
to remove an item is through the index number. Unfortunately, whenever
I add/modify + sort the list, the index changes; and I have to do a
linear search to find the item I want to remove, which is painfully
slow. Does anyone know a better way to do this? I use fxruby 1.0.
martinus

Right offhand, I don't think there's an easy fix, other than perhaps
storing the items' indices as their user data (and of course updating
each item's data ever time you make a change to the list that would
disrupt the indices. What kind of identifying information about the
item do you have when you get ready to remove it? Or do you have a
reference to the item itself?

ยทยทยท

On Sun, 19 Dec 2004 01:47:08 +0900, martinus <martin.ankerl@gmail.com> wrote:

Hi, I am writing an application where I add, remove and modify random
items of an FXIconList quite frequently. The only possible way i know
to remove an item is through the index number. Unfortunately, whenever
I add/modify + sort the list, the index changes; and I have to do a
linear search to find the item I want to remove, which is painfully
slow. Does anyone know a better way to do this?