Skip to main content

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

Hi Mark,

It seems like ur 'combo' object points to NULL. Run ur
program in debug mode and check reference value of 'combo'.

Cheers
Ranjeev

-----Original Message-----
From: pde-dev-admin@xxxxxxxxxxx [mailto:pde-dev-admin@xxxxxxxxxxx]On
Behalf Of Mark Drew
Sent: Wednesday, September 01, 2004 7:32 PM
To: pde-dev@xxxxxxxxxxx
Subject: [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/
_______________________________________________
pde-dev mailing list
pde-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/pde-dev


Back to the top