Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7529223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:36:07+00:00 2026-05-30T04:36:07+00:00

I haven’t worked with Cocoa bindings a lot before, so I would need a

  • 0

I haven’t worked with Cocoa bindings a lot before, so I would need a little help here.

I have a radio button group ( NSMatrix ) with three buttons and one checkbox.
I want the checkbox to be enabled only when the last radio button is selected.

Found a tutorial online which advised to bind the selected tag property of the radio button group to the enabled property of the checkbox. The last radiobutton needs to have a tag of 1, the others would need to have a tag of 0.
This works great.

The problem is, that if the checkbox is checked and the radiobutton selection is changed, it stays checked although it isn’t enabled. I would want that the box gets unchecked when it changes to the disabled state.

Any advise would be appreciated!
Thanks in advance!

Any way to achieve this without any code?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T04:36:08+00:00Added an answer on May 30, 2026 at 4:36 am

    I doubt it’s possible to do this without code.

    I handle this in the model, using KVO. Code looks something like this:

    -(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
        if ([@"checkWithInProcess" isEqualToString:keyPath]) {
    
            NSNumber *oldValue = [change objectForKey:NSKeyValueChangeOldKey];
            NSNumber *newValue = [change objectForKey:NSKeyValueChangeNewKey];
    
            BOOL oldValueAsBool = (oldValue != (id)[NSNull null]) && oldValue.boolValue;
            BOOL newValueAsBool = (newValue != (id)[NSNull null]) && newValue.boolValue;
    
            if (oldValueAsBool && !newValueAsBool) {
                // Save the value
                savedRecordValueWithInProcess = self.recordValueWithInProcess;
                self.recordValueWithInProcess = nil;
            } else if (!oldValueAsBool && newValueAsBool) {
                // Restore the value or set it to the default
                if (savedRecordValueWithInProcess)
                    self.recordValueWithInProcess = savedRecordValueWithInProcess;
                else
                    self.recordValueWithInProcess = [NSNumber numberWithBool:NO];
                savedRecordValueWithInProcess = nil;
            }
        }
    }
    

    And during initialization:

    [self addObserver:self
           forKeyPath:@"checkWithInProcess"
              options:NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew
              context:[Characteristic class]];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I haven't done a lot of work with multi-level, pure CSS drop-down menus before,
I haven't seen this question anywhere else, I hope someone can help. I have
I haven't worked with SQL Reporting much, however I have been trying to get
I haven't seen this datetime format before: 2010-08-19T16:09:07.08 The nearest I have found in
Haven't fired up reflector to look at the difference but would one expect to
Haven't seen many Geneva related questions yet, I have posted this question in the
Haven't seen anything about it here but it seems to solve one of the
I haven't done a lot of .NET programming, but I've examined a few of
I haven't found any documentation on this or seen this done before, but is
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.