Bug 81298 NPE changing style on SashForm in CustomControlExample
eclipse.buildId=I20041214-2000 java.version=1.4.2_06 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=linux, ARCH=x86, WS=motif, NL=en_US Framework arguments: -showlocation Command-line arguments: -os linux -ws motif -arch x86 -showlocation -clean java.lang.NullPointerException at org.eclipse.swt.examples.controlexample.Tab.log(Tab.java:785) at org.eclipse.swt.examples.controlexample.Tab.setExampleWidgetState(Tab.java:951) at org.eclipse.swt.examples.controlexample.SashFormTab.setExampleWidgetState(SashFormTab.java:136) at org.eclipse.swt.examples.controlexample.Tab.recreateExampleWidgets(Tab.java:805) at org.eclipse.swt.examples.controlexample.Tab$1.widgetSelected(Tab.java:138) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:736) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2948) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2648) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1569) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1540) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:285) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:144) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:102) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:220) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:185) at org.eclipse.core.launcher.Main.run(Main.java:710) at org.eclipse.core.launcher.Main.main(Main.java:694)
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/SashFormTab.java
smoothButton = new Button (styleGroup, SWT.CHECK);
		smoothButton.setText ("SWT.SMOOTH");
		smoothButton.setSelection(false);
	}
	
	/**
	 * Gets the "Example" widget children.
	 */
	Control [] getExampleWidgets () {
		return new Control [] {form};
	}
	
	/**
	 * Gets the text for the tab folder item.
	 */
	String getTabText () {
		return "SashForm"; 
	}
	
		/**
	 * Sets the state of the "Example" widgets.
	 */
	void setExampleWidgetState () {
		super.setExampleWidgetState ();
		horizontalButton.setSelection ((form.getStyle () & SWT.H_SCROLL) != 0);
		verticalButton.setSelection ((form.getStyle () & SWT.V_SCROLL) != 0);
		smoothButton.setSelection ((form.getStyle () & SWT.SMOOTH) != 0);
	}
}