Cabbage Logo
Back to Cabbage Site

Radio Group issues?

I am trying to set up several checkboxes to use as selector buttons, but I can’t seem to get this to work.

I included a video of what I am talking about. The top row of buttons are a radio group, and when I select them, I don’t think I am getting back what I am expecting from cabbageChanged. As you can see in the video, the number corresponding to the checkbox selected isn’t always correct on the label.

The bottom row of checkboxes are NOT in a radio group, and they seem to be returning everything correctly.

I’m baffled…

FMExample2.csd (3.0 KB)

Mike

I’m using Cabbage 2.9.22, on Mac OS 10.13.6…

I don’t have time to look at this right now, but I do recall having issues with this in the past. Here is fix though: New cabbageChanged opcode

Huh. I ran your program from the link, and the print out I am getting is always showing the previous button that I selected. So, if I select button1 (the first time only), nothing prints. Then I select button2, but the text printed is button1. It always lags behind by one button press.

I also upgraded to 2.9.30.

I’ll take a look a little later on :+1:

1 Like

I also added the option of using the threshold, and now my buttons are showing the same lag of one button press.

Yeah, radiogroups are tricky because when a button is pressed it triggers a callback for that button but not for the other buttons. So you need to check the value of each button whenever any of them change. Here is a simple example.

test.csd (1.1 KB)

Thanks for the help, Rory. Everything is working as I need for the moment.

I think I get why it is such a hard nut to crack…

1 Like