uidesigner/com.nokia.sdt.component.symbian.test/data/scripts/arrays_params.js
author wpaul
Thu, 05 Aug 2010 14:24:42 -0500
changeset 1775 2771fd853ac2
parent 0 fb279309251b
permissions -rw-r--r--
removed unneeded code.



function ArrayTest() {
}

ArrayTest.prototype.getLength = function(properties, prop) {
	return properties[prop].length;
}


ArrayTest.prototype.setElementAt = function(properties, prop, idx, val) {
	properties[prop][idx] = val;
}

ArrayTest.prototype.getElementAt = function(properties, prop, idx) {
	return properties[prop][idx]
}

ArrayTest.prototype.setElementAtSub = function(properties, prop, idx, sub, val) {
	properties[prop][idx][sub] = val;
	
	// don't crash, even though "sub" isn't a real property
	properties[prop][idx].sub = val;
}

ArrayTest.prototype.getElementAtSub = function(properties, prop, idx, sub) {
	return properties[prop][idx][sub];
}

ArrayTest.prototype.resizeAndCheck = function(properties, prop, size) {
	properties[prop].length = size;
	return properties[prop].length;
}