Question

I am working on an eclipse RCP project. As I was going through the walkthroughs I came across preference page and started working around it.

Now I need to change the values of the ComboFieldEditor dynamically. As in when I make a selection on a TextFieldEditor the values of the ComboFieldEditor must change. I tried searching for an answer and even tried one of the solutions I found on Stack Overflow, but I always ended up with NullPointerException. Can someone help me in this regard?

Technically I want to change the values in the ComboFieldEditor dynamically. As in, when a listener is triggered I want to put new values in my combobox. I tried this solution but I kept getting a NullPointerException.

Was it helpful?

Solution

Ok. This is something that I did for the time being. I created a class named CustomComboFieldEditor and added all the methods present in the ComboFieldEditor. I changed the methods that helped to input the values in the combo box. Works fine for me as of now. I am sure its not the prettiest of all ways and I bet I would be crucified for this solution, but time and situation forced me into using it. Anyother way would be appreciated.

Thanks :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top