Page 1 of 1

Posted: 12 May 2016, 01:24
by woodslanding
I've tried:

setLength(output, -1);

and

setValue(output, -1);

and both A and B.

And in all cases my outputs are tied....

How can I free them up??

Posted: 12 May 2016, 01:35
by woodslanding
Okay, looks like the problem is when I use an array of tParameter--I'm trying:
[c]
for i := 0 to SEND_COUNT-1
do begin
setLength(OUTs,-1);
setValue(OUTs, -1);
end; [/c]

And just getting zeroes on output.

Regular tParameters work.

Posted: 12 May 2016, 13:43
by drakh
for the array as output parameter use this
for i:=0 to some_number
do begin
SetDataArrayValue(your_output_data_array,i,element_value);
end;
SetLength(output_data_array,some number); //you dont need to do this after setting each value, doing it after you end the iteration is fine

if you want just send "empty array" SetLength(output_data_array,0);

Posted: 12 May 2016, 21:28
by woodslanding
I figured it out. I thought I had tried every combination, but I had not. This is what worked. The outputs still show 0, but they are red, and the switches they are connected to can be turned on and off by the user.

[c] for i := 0 to SEND_COUNT-1
do begin
setLength(OUTs,-1);
//setValue(OUTs, -1); // undoes the previous code!!
end; [/c]

Maybe this will help someone someday (maybe me ;))