uidesigner/com.nokia.sdt.component.symbian.test/data/scripts/arrays_params.js
author timkelly
Wed, 25 Mar 2009 11:55:19 -0500
changeset 8 f330c1e8a4f3
parent 2 d760517a8095
permissions -rw-r--r--
commit the merge



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