About   |   Getting Started   |   Downloads   |   Documentation   |   Forum


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Radiobutton groups bug
10-29-2014, 04:21 AM
Post: #1
Radiobutton groups bug
Hello. I have encountered a problem with radiobutton groups. I add two radiobutton groups to a single panel. On OSx 10.7 they work as intended - as two groups. But on OSx 10.9+ they work as if they were a single group. Do you have any suggestions on how to fix this problem?
Find all posts by this user
Quote this message in a reply
10-29-2014, 09:44 AM
Post: #2
RE: Radiobutton groups bug
We have not seen this behavior before in any version of OS X. Can you provide an example that exhibits the problem? Perhaps by modifying the sample panel plugin from CORE. For starters, just provide the code necessary to create the radio button objects and their containing groups, as well as adding them to the panel.
Find all posts by this user
Quote this message in a reply
10-30-2014, 07:32 AM
Post: #3
RE: Radiobutton groups bug
Here is code snippet. Am I using the functional correctly?


panel = hdi::core::Panel( "Panel", hdi::core::Size(800, 800), false, false);
hdi::core::RadioButtonGroup units;
hdi::core::RadioButtonGroup axis;

int currentX = 170;
int currentY = 45;
axisOff = hdi::core::RadioButton(hdi::core::Point(currentX, currentY), "Off", 80);
axisOff.setClickCallback(HDI_CORE_CALLBACK(SettingsDialog, this, OnAxisOffButton));
panel.addWidget(axisOff);
currentY += 20;
axisShowSmall = hdi::core::RadioButton(hdi::core::Point(currentX, currentY), "Show small", 80);
axisShowSmall.setClickCallback(HDI_CORE_CALLBACK(SettingsDialog, this, OnAxisSmallButton));
panel.addWidget(axisShowSmall);
currentY += 20;
axisShowLarge = hdi::core::RadioButton(hdi::core::Point(currentX, currentY), "Show large", 80);
axisShowLarge.setClickCallback(HDI_CORE_CALLBACK(SettingsDialog, this, OnAxisLargeButton));
panel.addWidget(axisShowLarge);
axis.add(axisOff);
axis.add(axisShowSmall);
axis.add(axisShowLarge);
axisShowLarge.setChosen(true);

currentY += 84;
unitsInches = hdi::core::RadioButton(hdi::core::Point(currentX, currentY), "Inches", 80);
unitsInches.setClickCallback(HDI_CORE_CALLBACK(SettingsDialog, this, OnInchesButton));
panel.addWidget(unitsInches);
currentY += 20;
unitsMillimeters = hdi::core::RadioButton(hdi::core::Point(currentX, currentY), "Millimeters", 80);
unitsMillimeters.setClickCallback(HDI_CORE_CALLBACK(SettingsDialog, this, OnMillimetersButton));
panel.addWidget(unitsMillimeters);
units.add(unitsInches);
units.add(unitsMillimeters);
Find all posts by this user
Quote this message in a reply
10-31-2014, 11:51 AM
Post: #4
RE: Radiobutton groups bug
I have not tried your code yet, but it looks fine at first glance. I will test it soon and get back to you. Thanks.
Find all posts by this user
Quote this message in a reply
11-11-2014, 06:19 PM
Post: #5
RE: Radiobutton groups bug
It appears that Apple made a change in some update of OS X that causes all radio buttons to belong to a group by default, and this (being a platform group) overrides our logical group. I have fixed the bug in our underlying libraries, and the fix will be available in a forthcoming 0.5.7 release.
Find all posts by this user
Quote this message in a reply
12-15-2014, 10:27 PM
Post: #6
RE: Radiobutton groups bug
I just thought I would let you know that 0.5.7 has been released, and it addresses this problem.
Find all posts by this user
Quote this message in a reply
09-18-2016, 02:12 PM
Post: #7
RE: Radiobutton groups bug
This is my project with radio buttons, and I don't understand the unusual behavior. First, if I bounce between the various buttons, occasionally two will be selected. If I do a slow double-click on a button or its text, it will deselect, leaving no buttons chosen. If I do a rapid double-click, it flashes but nothing changes. I thought the group's setDefaultButton function would set the target button as selected when the group first appears, but none are selected unless I explicitly setChosen on a button. Here's the code:

Code:
    hdi::core::RadioButton VHbtn(hdi::core::Point(marginWidth,marginHeight+rowHeight), "Vertical and horizontal", fullLabelWidth);
    VHbtn.setClickCallback(HDI_CORE_CALLBACK(panel::Plugin, this, __VHbtnCB));
    this->__docPanel.addWidget(VHbtn);
    
    hdi::core::RadioButton PrefConstBtn(hdi::core::Point(marginWidth,marginHeight+(rowHeight*2)), "Preferences constrain angle", fullLabelWidth);
    PrefConstBtn.setClickCallback(HDI_CORE_CALLBACK(panel::Plugin, this, __PrefConstBtnCB));
    this->__docPanel.addWidget(PrefConstBtn);
    
    hdi::core::RadioButton DomAxisBtn(hdi::core::Point(marginWidth,marginHeight+(rowHeight*3)), "Object's dominant axis", fullLabelWidth);
    DomAxisBtn.setClickCallback(HDI_CORE_CALLBACK(panel::Plugin, this, __DomAxisBtnCB));
    this->__docPanel.addWidget(DomAxisBtn);
    
    hdi::core::RadioButton CollapseCtlBtn(hdi::core::Point(marginWidth,marginHeight+(rowHeight*4)), "Just collapse control handles", fullLabelWidth);
    CollapseCtlBtn.setClickCallback(HDI_CORE_CALLBACK(panel::Plugin, this, __CollapseCtlBtnCB));
    this->__docPanel.addWidget(CollapseCtlBtn);
    
    hdi::core::RadioButtonGroup BtnGrp;
    BtnGrp.add(VHbtn);
    BtnGrp.add(PrefConstBtn);
    BtnGrp.add(DomAxisBtn);
    BtnGrp.add(CollapseCtlBtn);
    BtnGrp.setDefaultButton(VHbtn);
    VHbtn.setChosen(true);

I'm using Xcode 7 for Mac CS6. My code looks a lot like Gaxx's, but I'm having other issues. Am I doing something incorrectly or is this a bug?
Thanks -- Rick
Find all posts by this user
Quote this message in a reply
09-25-2016, 10:50 PM
Post: #8
RE: Radiobutton groups bug
Hmm, your code looks correct off the top of my head, and we haven't heard of this bug from customers (or seen it ourselves). I wonder what you're doing in your click callback(s) which might be involved in producing this bug? I'll try to have a look at it in our test plugins soon though.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)