Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > FXIconList with frequent changes

Reply
Thread Tools

FXIconList with frequent changes

 
 
martinus
Guest
Posts: n/a
 
      12-18-2004
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

 
Reply With Quote
 
 
 
 
Lyle Johnson
Guest
Posts: n/a
 
      12-19-2004
On Sun, 19 Dec 2004 01:47:08 +0900, martinus <> 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?


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?


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Connection Strings Frequent Password Changes Help Chuck ASP .Net Security 4 11-04-2009 08:52 AM
frequent crashes with US Robotics 8054 22MB/s wireless card Massimo Lencioni Wireless Networking 1 10-27-2004 11:22 PM
frequent crashes with US Robotics 8054 22MB/s wireless card NGI Wireless Networking 0 10-27-2004 01:40 PM
Frequent Disconnections David McKinnon Wireless Networking 13 06-24-2004 08:03 PM
FXIconList Questions Karl Ruby 0 08-05-2003 03:39 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57