newValue = newValue(fieldName, newText, max);
newValue = unformattedIntValue(fieldName, newText, characterCount == 0, max);
void onVerify(Event event) {	if (ignoreVerify) return;	event.doit = false;	int fieldName = fieldNames[currentField];	int start = fieldIndices[currentField].x;	int end = fieldIndices[currentField].y;	int length = end - start;	String newText = event.text;	if (fieldName == Calendar.AM_PM) {		if (newText.equalsIgnoreCase("A") || newText.equalsIgnoreCase("AM")) {			setTextField(fieldName, Calendar.AM, true, false);		} else if (newText.equalsIgnoreCase("P") || newText.equalsIgnoreCase("PM")) {			setTextField(fieldName, Calendar.PM, true, false);		}		return;	}	if (characterCount > 0) {		newText = "" + text.getSelectionText() + newText;	}	int newTextLength = newText.length();	boolean first = characterCount == 0;	characterCount = (newTextLength < length) ? newTextLength : 0;	int max = calendar.getActualMaximum(fieldName);	int min = calendar.getActualMinimum(fieldName);	int newValue = newValue(fieldName, newText, max);	if (first && newValue == 0 && length > 1) {		setTextField(fieldName, newValue, false, false);	} else if (min <= newValue && newValue <= max) {		setTextField(fieldName, newValue, characterCount == 0, characterCount == 0);	} else {		if (newTextLength >= length) {			newText = newText.substring(newTextLength - length + 1);			newValue = newValue(fieldName, newText, max);			if (newValue != -1) {				characterCount = length - 1;				if (min <= newValue && newValue <= max) {					setTextField(fieldName, newValue, characterCount == 0, true);				}			}		}	}}