int value = getSelectionText () + delta;
int value = getSelectionText (); int newValue = value + delta;
int kEventTextInputUnicodeForKeyEvent (int nextHandler, int theEvent, int userData) {	int result = super.kEventTextInputUnicodeForKeyEvent (nextHandler, theEvent, userData);	if (result == OS.noErr) return result;	int [] keyboardEvent = new int [1];	OS.GetEventParameter (theEvent, OS.kEventParamTextInputSendKeyboardEvent, OS.typeEventRef, null, keyboardEvent.length * 4, null, keyboardEvent);	int [] keyCode = new int [1];	OS.GetEventParameter (keyboardEvent [0], OS.kEventParamKeyCode, OS.typeUInt32, null, keyCode.length * 4, null, keyCode);	int delta = 0;	switch (keyCode [0]) {		case 36: /* Return */			int value = getSelectionText ();			setSelection (value, true);			postEvent (SWT.DefaultSelection);			break;		case 116: /* Page Up */ delta = pageIncrement; break;		case 121: /* Page Down */ delta = -pageIncrement; break;		case 125: /* Down */ delta = -increment; break;		case 126: /* Up */ delta = increment; break;	}	if (delta != 0) {		int value = getSelectionText () + delta;		int max = OS.GetControl32BitMaximum (buttonHandle);		int min = OS.GetControl32BitMinimum (buttonHandle);		if (value > max) value = min;		if (value < min) value = max;		setSelection (value, true);		return OS.noErr;	}	return result;}