uidesigner/com.nokia.sdt.component.symbian.test/data/scripts/arrays_params.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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
cawthron
parents:
diff changeset
     1
cawthron
parents:
diff changeset
     2
cawthron
parents:
diff changeset
     3
function ArrayTest() {
cawthron
parents:
diff changeset
     4
}
cawthron
parents:
diff changeset
     5
cawthron
parents:
diff changeset
     6
ArrayTest.prototype.getLength = function(properties, prop) {
cawthron
parents:
diff changeset
     7
	return properties[prop].length;
cawthron
parents:
diff changeset
     8
}
cawthron
parents:
diff changeset
     9
cawthron
parents:
diff changeset
    10
cawthron
parents:
diff changeset
    11
ArrayTest.prototype.setElementAt = function(properties, prop, idx, val) {
cawthron
parents:
diff changeset
    12
	properties[prop][idx] = val;
cawthron
parents:
diff changeset
    13
}
cawthron
parents:
diff changeset
    14
cawthron
parents:
diff changeset
    15
ArrayTest.prototype.getElementAt = function(properties, prop, idx) {
cawthron
parents:
diff changeset
    16
	return properties[prop][idx]
cawthron
parents:
diff changeset
    17
}
cawthron
parents:
diff changeset
    18
cawthron
parents:
diff changeset
    19
ArrayTest.prototype.setElementAtSub = function(properties, prop, idx, sub, val) {
cawthron
parents:
diff changeset
    20
	properties[prop][idx][sub] = val;
cawthron
parents:
diff changeset
    21
	
cawthron
parents:
diff changeset
    22
	// don't crash, even though "sub" isn't a real property
cawthron
parents:
diff changeset
    23
	properties[prop][idx].sub = val;
cawthron
parents:
diff changeset
    24
}
cawthron
parents:
diff changeset
    25
cawthron
parents:
diff changeset
    26
ArrayTest.prototype.getElementAtSub = function(properties, prop, idx, sub) {
cawthron
parents:
diff changeset
    27
	return properties[prop][idx][sub];
cawthron
parents:
diff changeset
    28
}
cawthron
parents:
diff changeset
    29
cawthron
parents:
diff changeset
    30
ArrayTest.prototype.resizeAndCheck = function(properties, prop, size) {
cawthron
parents:
diff changeset
    31
	properties[prop].length = size;
cawthron
parents:
diff changeset
    32
	return properties[prop].length;
cawthron
parents:
diff changeset
    33
}