radiogroup bug

dequalsrxt's icon

Playing around with radiogroup, I noticed that if you click around the very bottom edge of the object, it selects the next, invisible item. So for example if there are only 2 items, it selects item 3, which you can see if you re-size the object to 3. It's also reflected in the output. This happens in both button and check box modes.

TFL's icon

I can reproduce too. Worth reporting to the technical support here to fix that.

Similarly, I was able to output a velocity of -2 from a [kslider] by clicking at the very bottom of a key while maybe scrolling or I'm not sure how, I never managed to reproduce.

dequalsrxt's icon

Submitted. Strange no one else has noticed this. Well probably someone has, but I did search the forum and couldn't find any mention. I suppose it has to do with this note in the reference file:

Note: radiogroup can be re-sized horizontally so it will extend under comment boxes placed to the right of the buttons or boxes. this way, clicking on the text to the right of the button will also set the button selection or box state.

I was looking at using it for an extremely non-critical purpose, so not a big deal. But radiogroup seems nice because it activates on mouse-down rather than mouse-up like similar objects, which feels a bit sluggish in this situation. I guess I could just use message boxes.

edit: heard back from support, yeah it has been reported before.

TFL's icon

The note you found in the reference file is more about this kind of use:

Max Patch
Copy patch and select New From Clipboard in Max.

dequalsrxt's icon

Yeah. I was just wondering if the border space being part of the button had anything to do with the bug.

mizu's icon

Hi ! Seems to have to do with offset : if bigger, the part under a button is dedicated to the next one ?

TFL's icon

Hi ! Seems to have to do with offset : if bigger, the part under a button is dedicated to the next one ?

True! The second half of the empty part below the last button will trigger the next one. Very obvious with big offsets. It seems that the size attribute just visually truncates the UI but doesn't actually clamp the output.

In Check mode we kind of have something in-between. With flagmode disabled (the default), clicking in the lowest part will simply retrigger the last output (same as banging the object). But if you enable flagmode, you can definitely check the invisible checkbox situated at size + 1 which will have an impact on the output.

dequalsrxt's icon

A couple pixels make a big difference! I didn't try the offset attribute before. Yes, very obvious what's going on with large offsets, but I can't get the bug to trigger with an offset of 14 or 15, as opposed to the default of 16. I'm sure it's still possible, but not as likely.

And yeah, it seems the actual size of the object is +1 of the visible size. So if the visible size is 1 button, and you send the object an integer of 1 or greater, the invisible, second button get selected.

Roman Thilenius's icon

creating your own is simpler than you think.

dequalsrxt's icon

Sure, plenty of ways to achieve the same functionality. I think I've actually moved on from using it in my patch. Just poking around at this point.