Cabbage Logo
Back to Cabbage Site

Chnget VS cabbageGetValue

Hi Rory,
I’m preparing a sample for CsoundUnity where I’d like to show all the available widgets to demonstrate the upcoming Preset functionality.
I’m having problems with the Checkbox.
Probably I’m missing something here!
I have a checkbox like this:

checkbox bounds(16, 160, 100, 26) channel("filtOn") text("filter on")

And I’m trying to get its value with chnget, but its value it’s always the default one.
I have the correct result with cabbageGetValue instead.
Is it expected that those two lines give different results?

kFiltOn = chnget("filtOn")
kFiltOn cabbageGetValue "filtOn"

Cabbage v 2.8.0

You probably need to use chnget:k()?

Yes that’s it!
Thanks!!