uidesigner/com.nokia.sdt.component.symbian.test/data/scripts/arrays.js
changeset 0 fb279309251b
equal deleted inserted replaced
-1:000000000000 0:fb279309251b
       
     1 
       
     2 
       
     3 function ArrayTest() {
       
     4 }
       
     5 
       
     6 ArrayTest.prototype.getLength = function(prop) {
       
     7 	return properties[prop].length;
       
     8 }
       
     9 
       
    10 
       
    11 ArrayTest.prototype.setElementAt = function(prop, idx, val) {
       
    12 	properties[prop][idx] = val;
       
    13 }
       
    14 
       
    15 ArrayTest.prototype.getElementAt = function(prop, idx) {
       
    16 	return properties[prop][idx]
       
    17 }
       
    18 
       
    19 ArrayTest.prototype.setElementAtSub = function(prop, idx, sub, val) {
       
    20 	properties[prop][idx][sub] = val;
       
    21 	
       
    22 	// don't crash, even though "sub" isn't a real property
       
    23 	properties[prop][idx].sub = val;
       
    24 }
       
    25 
       
    26 ArrayTest.prototype.getElementAtSub = function(prop, idx, sub) {
       
    27 	return properties[prop][idx][sub];
       
    28 }
       
    29 
       
    30 ArrayTest.prototype.resizeAndCheck = function(prop, idx, size) {
       
    31 	properties[prop].length = size;
       
    32 	return properties[prop].length;
       
    33 }
       
    34 
       
    35