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 6789047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:33:27+00:00 2026-05-26T17:33:27+00:00

I am trying a simple application where I have a mutable array of mutable

  • 0

I am trying a simple application where I have a mutable array of mutable dictionaries, such as –

NSMutableDictionary *sample6 = [[NSMutableDictionary alloc] initWithObjectsAndKeys:@"title6",@"title",[NSNumber numberWithBool:NO],@"state", nil];

In IB I created a table view with NSButtonCell (check box).

I was able to show checkboxes state (checked or unchecked), using following table column bindings:

Value - ArrayController.arrangedObjects.state

In this case it shows an array of checkboxes with title – “Check” as shown in below screen-shot:

enter image description here

Now my aim is to show checkboxes title using bindings, such that it
gets value from same mutable dictionary from which it is getting its
state.

I tried following binding for button cell but it did not work:

title -> ArrayController.selection.title

I also tried this binding for button cell :

title -> ArrayController.arrangedObjects.title

but it didn’t work, it appeared like this after using above binding:

enter image description here

Can any one suggest me which controller key to use and if this is not the correct way to show titles then what is the correct way to do so?

  • 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-26T17:33:27+00:00Added an answer on May 26, 2026 at 5:33 pm

    Unfortunately you’ll need to write a little code if you want to do it this way. When binding table column values to an array, the table column is handling taking the prototype data cell, setting its values, and “stamping” it in place for each row. The button cell’s bindings aren’t exposed “through” the table column, so a simple binding won’t do it for you.

    To Answer Your Question

    So. Since only the value binding is exposed, the title must be set manually if you really want the checkbox’s title to reflect the value (ie, you really want the checkbox to handle both the check state and displaying the title). To do this, you have to mix bindings with < NSTableDelegateProtocol > . Use the -tableView:willDisplayCell:forTableColumn:row: method to set the cell’s -title property to that of the proper object in your array controller’s -arrangedObjects array each time you’re asked. Mixing bindings and data source / delegate methods is actually quite common for more than the most basic applications, so don’t worry that you’re doing something dirty. Note: you won’t be able to support editing the title by doing this since it’s a checkbox.

    An Alternative Design

    Personally, I’d avoid all that and just add a separate table column for the title. Bind the new column’s value to the array controller’s arrangedObjects.title and turn off the checkbox button cell’s title so only the checkbox itself is displayed. That simplifies the whole thing greatly and allows editing the title.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple WPF application which I am trying to start. I am
I have a simple windows service application I am trying to debug in VS
I have a simple rails 2.3.4 application I am trying to get running with
I am trying to learn WCF. I have a simple client and server application
I have created a very simple application where I am trying to insert a
I`m trying to create simple QML application. I have QtSDK installed with latest QtCreator.
I have been trying to create a simple application that will let the user
I have a simple application where I am trying to save a value into
I'm trying to build simple facebook application with 4.2.1 C# SDK. But I have
I have a very simple application where I am trying to use the gyroscope

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.