Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[pde-dev] Getting the Value from a org.eclipse.swt.widgets.Combo

Hi there
first post from a newby

I am (trying) to develop a ComboBox drop down widnow that popsup and
creates a Combo. All is working, and I am populating the drop down
with

combo.add(items[i]); 

I have also added a method 
protected void buttonPressed(int buttonId) {
       if (buttonId == IDialogConstants.OK_ID) {
           
           System.out.println("your selection is "  +
combo.getSelectionIndex()+  "somthing");
        }
       super.buttonPressed(buttonId);
       
   }
        }
       super.buttonPressed(buttonId);
       
   }

But when I run this, I get an error in the System.out.println that:
Unhandled event loop exception
Reason:
java.lang.NullPointerException


What is the correct way to get data from a dropdown in a combo?

Any help greatly apreciated
-- 
Mark Drew
mailto:mark.drew@xxxxxxxxx
coldfusion and cfeclipse blog:http://cybersonic.blogspot.com/


Back to the top