uidesigner/com.nokia.sdt.component.symbian.test/data/componentValidatorTest/validate.js
author fturovic <frank.turovich@nokia.com>
Tue, 07 Apr 2009 13:41:27 -0500
branchRCL_2_0
changeset 67 47ecdc260147
parent 2 d760517a8095
permissions -rw-r--r--
updated release date


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;
}