View Full Version : Adding a column
lvijay
March 30th, 2006, 07:36 AM
I'm working on a project in limewire's gnutella and we're calculating some information retrieval values from the results obtained. we'd like to show these results in a separate column. how do i go about adding this column?
i tried adding the necessary code in SearchTableColumns (i.e. i copy pasted an existing columns definition, added 1 to the count, increased the maximum count and added this value to switch case in the same file), but when i compile and run, i get an exception that even refuses to let limewire run.
so, which files do i change to add a column?
Thanks
Vijay Lakshminarayanan
Zootella
March 30th, 2006, 03:01 PM
Hi lvijay,
What exception are you getting?
Sam
April 4th, 2006, 04:31 AM
Yes, the exception would be helpful. You're on the right path with the columns though. There may need to be an additional change in TableLine.java, which will need to show the data according to the column from SearchTableColumns.
We'd also be very interested in hearing what kind of research you're doing with LimeWire. It's always good to be helping out the research community.
lvijay
April 4th, 2006, 03:53 PM
I apologize for not responding immediately. My laptop has been damaged and I don't have any means to work or paste the exact exception.
I'll try to explain what I did and maybe you could tell me what I did wrong. As of now, it seems that fixing my laptop is impossible so I have resigned myself to buying one.
I made my changes in com.limegroup.gnutella.gui.search.SearchTableColum ns
The first few lines of the class are essentially defining the columns. So there I copy pasted one and put in my own name "RESULT_PANEL_TFREQ". Then I increased "DEFAULT_COLUMN_COUNT" by one (to 13) and I added a case in the switch statement at the bottom of the file.
Compilation worked but running it threw exceptions.
I will give a more detailed response in a few days.
Thanks and apologies for such a delayed response.
Vijay Lakshminarayanan
nomolos
April 4th, 2006, 11:59 PM
Well, I can tell you what you might have done wrong, but as I'm still learning the code I unfortunately cannot tell you how to fix it at this time. When you define a new column, the id you give it "RESULT_PANEL_TFREQ" is used to look up the appropriate name in a resource bundle for localization purposes. As such, it is most likely throwing the exception when it cannot locate the localization resource associated with "RESULT_PANEL_TFREQ". However, as I noted earlier I don't know the code terribly well, so I could be wrong on this, but it's a suggestion as to what is going wrong. As for fixing it, however, I'm not sure - still trying to track down where all the localization stuff is kept.
gubatron
April 5th, 2006, 02:13 AM
for the internationalization take a look at:
lib/messagebundles/MessagesBundle.properties
for English
If you're interested in how limewire is translated to other languages checkout the rest of the MessagesBundle_xx_XX.properties
Also take a look at
lib/messagebundles/localize.txt
vBulletin® v3.7.1, Copyright ©2000-2010, Jelsoft Enterprises Ltd.