uidesigner/com.nokia.sdt.component.symbian.test/data/scripts/arrays_params.js
author cawthron
Tue, 24 Mar 2009 22:20:21 -0500
changeset 2 d760517a8095
permissions -rw-r--r--
new



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