Hi everyone,
I’m having difficulties with my switch script. Below is the code:
public function resultValue():void {
switch (_calcSwitch) {
case 0:
break;
case 1:
for(var q:int; q < queryArray.length; q++) {
_result = _result.(attribute(queryArray[q][0])==queryArray[q][1]);
}
trace(_result);
trace(queryArray);
trace("==");
break;
case 2:
for(var w:int; w < queryArray.length; w++) {
_result = _result.(attribute(queryArray[w][0])>=queryArray[w][1]);
}
trace(_result);
trace(queryArray);
trace(">=");
break;
case 3:
for(var c:int; c < queryArray.length; c++) {
_result = _result.(attribute(queryArray[c][0])<=queryArray[c][1]);
}
trace(_result);
trace("<=");
break;
case 4:
for(var r:int; r < queryArray.length; r++) {
_result = _result.(attribute(queryArray[r][0])>queryArray[r][1]);
}
trace(_result);
trace(">");
break;
case 5:
for(var t:int; t < queryArray.length; t++) {
_result = _result.(attribute(queryArray[t][0])<queryArray[t][1]);
}
trace(_result);
trace("<");
break;
case 6:
for(var i:int; i < queryArray.length; i++) {
_result = _result.(attribute(queryArray*[0])!=queryArray*[1]);
}
trace(_result);
trace("!=");
break;
default:
trace("Er zijn geen entries!");
}
}
Inside the for loop you’ll notice the difference per case, I use ==, >=, <=, >, <, != per case. The point is that my program does this when I go in this order:
== to == to == to >=, Works perfectly, i get my results clear.
>= (and all the others) to ==, Does not work, it puts the ‘query’ in the array but won’t display the results. Somehow I’m getting the feeling that the script doesn’t know how to read from >= to ==.
Anyone has any thoughts about this?
Thanks in advance!