Ok, this lead me to wonder what the size of the array being passed, and even that came back with -1.
<Cabbage>
form caption("Untitled") size(400, 300), guiMode("queue"), pluginId("def1")
checkbox bounds(10, 10, 40, 40) channel("p1") radioGroup("pgrp")
checkbox bounds(10, 30, 40, 40) channel("p2") radioGroup("pgrp")
checkbox bounds(10, 50, 40, 40) channel("p3") radioGroup("pgrp")
checkbox bounds(10, 70, 40, 40) channel("p4") radioGroup("pgrp")
keyboard bounds(8, 158, 381, 95)
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -+rtmidi=NULL -M0 -m0d --midi-key-cps=4 --midi-velocity-amp=5
</CsOptions>
<CsInstruments>
; Initialize the global variables.
ksmps = 32
nchnls = 2
0dbfs = 1
instr 2
SQrtObjSelect[] = fillarray("p1", "p2", "p3", "p4")
kVal[] cabbageGetValue SQrtObjSelect
if changed(kVal[0], kVal[1], kVal[2], kVal[3]) == 1 then
printsk "len: %d\n", lenarray(kVal)
endif
endin
</CsInstruments>
<CsScore>
;causes Csound to run for about 7000 years...
i 2 0 -1
f0 z
</CsScore>
</CsoundSynthesizer>
I ran the above program in both 2.8 and 2.8.46, and both of them return -1 for the length of ‘kVal’.