uidesigner/com.nokia.sdt.component.symbian.test/data/componentValidatorTest/validate.js
author john.dean.3@nokia.com
Fri, 06 Nov 2009 12:28:33 -0600
branchRCL_2_4
changeset 567 019adf6accac
parent 0 fb279309251b
permissions -rw-r--r--
Standardized class and method naming after code review


function ComponentValidator() {
}

ComponentValidator.prototype.validate = function(instance, laf) {
	return null;
}

ComponentValidator.prototype.queryPropertyChange = function(instance, propertyPath, newValue, laf) {
	var result = null;
	if (propertyPath == "always")
		result = null;
	else if (propertyPath == "never")
		result = "not allowed";
	else if (propertyPath == "notnull") {
		if (newValue == null)
			result = "not null";
	}
	else if (propertyPath == "compound.oddonly") {
		if ((newValue & 1)==0)
			result = "odd only";
	}
	else 
		result = "unknown";
	return result;
}