# Radio Group issues?

**URL:** <https://forum.cabbageaudio.com/t/radio-group-issues/3636>\
**Category:** Cabbage Stew\
**Created:** [23 March 2023 13:59 UTC](https://forum.cabbageaudio.com/t/radio-group-issues/3636 "2023-03-23T13:59:37Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mjmogo](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/mjmogo/32/3522_2.png) [@mjmogo](https://forum.cabbageaudio.com/u/mjmogo)\
**Post date:** [23 March 2023 13:59 UTC](https://forum.cabbageaudio.com/t/radio-group-issues/3636/1 "2023-03-23T13:59:37Z")

</div>

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](https://forum.cabbageaudio.com/uploads/short-url/9SbOSpxt6MmBkP0AW5lPlKWdHjJ.csd) (3.0 KB)

Mike

---

<div class="post-metadata">

**Author:** ![mjmogo](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/mjmogo/32/3522_2.png) [@mjmogo](https://forum.cabbageaudio.com/u/mjmogo)\
**Post date:** [23 March 2023 14:04 UTC](https://forum.cabbageaudio.com/t/radio-group-issues/3636/2 "2023-03-23T14:04:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rorywalsh](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/rorywalsh/32/165_2.png) [@rorywalsh](https://forum.cabbageaudio.com/u/rorywalsh)\
**Post date:** [23 March 2023 14:31 UTC](https://forum.cabbageaudio.com/t/radio-group-issues/3636/3 "2023-03-23T14:31:02Z")

</div>

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](https://forum-next.cabbageaudio.com/t/new-cabbagechanged-opcode/2732/14)

---

<div class="post-metadata">

**Author:** ![mjmogo](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/mjmogo/32/3522_2.png) [@mjmogo](https://forum.cabbageaudio.com/u/mjmogo)\
**Post date:** [23 March 2023 15:00 UTC](https://forum.cabbageaudio.com/t/radio-group-issues/3636/4 "2023-03-23T15:00:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rorywalsh](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/rorywalsh/32/165_2.png) [@rorywalsh](https://forum.cabbageaudio.com/u/rorywalsh)\
**Post date:** [23 March 2023 15:09 UTC](https://forum.cabbageaudio.com/t/radio-group-issues/3636/5 "2023-03-23T15:09:53Z")

</div>

I’ll take a look a little later on 👍

---

<div class="post-metadata">

**Author:** ![mjmogo](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/mjmogo/32/3522_2.png) [@mjmogo](https://forum.cabbageaudio.com/u/mjmogo)\
**Post date:** [23 March 2023 15:12 UTC](https://forum.cabbageaudio.com/t/radio-group-issues/3636/6 "2023-03-23T15:12:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rorywalsh](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/rorywalsh/32/165_2.png) [@rorywalsh](https://forum.cabbageaudio.com/u/rorywalsh)\
**Post date:** [23 March 2023 15:57 UTC](https://forum.cabbageaudio.com/t/radio-group-issues/3636/7 "2023-03-23T15:57:04Z")

</div>

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](https://forum.cabbageaudio.com/uploads/short-url/qACGjwiPbhBZP6L8cPI3Aay2n14.csd) (1.1 KB)

---

<div class="post-metadata">

**Author:** ![mjmogo](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/mjmogo/32/3522_2.png) [@mjmogo](https://forum.cabbageaudio.com/u/mjmogo)\
**Post date:** [23 March 2023 17:20 UTC](https://forum.cabbageaudio.com/t/radio-group-issues/3636/8 "2023-03-23T17:20:48Z")

</div>

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…
