Bug 23936 NPE in ControlExample
swt 20020920 1. Run the ControlExample 2. Go to the CoolBar Tab 3. Check the style SWT.DROP_DOWN 4. Drag the CoolItem so that you get a chevron 5. Click two time over the chevron (is not a double-click) walkback: java.lang.NullPointerException at org.eclipse.swt.examples.controlexample.CoolBarTab$CoolItemSelectionListener.wid getSelected(CoolBarTab.java:416) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:833) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1622) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1368) at org.eclipse.swt.examples.controlexample.ControlExample.main (ControlExample.java:103) Exception in thread "main" The bug is in the example.
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CoolBarTab.java
* is selected by its gripper or if the drop down arrow
			 * (or 'chevron') is selected. Examine the event detail
			 * to determine where the widget was selected.
			 */
			if (event.detail == SWT.ARROW) {
				/* If the popup menu is already up (i.e. user pressed arrow twice),
				 * then dispose it.
				 */
				if (menu != null) {
					menu.dispose();
					menu = null;
					return;
				}
				
				
				CoolItem coolItem = (CoolItem) event.widget;
				Rectangle itemBounds = coolItem.getBounds ();
				Point pt = coolBar.toDisplay(new Point (itemBounds.x, itemBounds.y));
				itemBounds.x = pt.x;
				itemBounds.y = pt.y;
				
				
				ToolBar toolBar = (ToolBar) coolItem.getControl ();
				ToolItem[] tools = toolBar.getItems ();
				int toolCount = tools.length;
								
				/* Convert the bounds of each tool item to display coordinates,
				 * and determine which ones are past the bounds of the cool item.
				 */
				int i = 0;