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

  • Home
  • SEARCH
  • 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 3947618
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:16:24+00:00 2026-05-20T01:16:24+00:00

I have a custom NSView (MyView), which is rendered by the NSViewCollectionItem. MyView has

  • 0

I have a custom NSView (MyView), which is rendered by the NSViewCollectionItem.

MyView has a property of type MyObject.

My main NSWindowController has IBOutlets to NSViewCollection and NSArrayController.

NSArrayController is bound to an array of objects of type MyObject.

I’d like to have the values from the array to be bound to “myView.myObject” path.

I can’t figure out how to set this up in IB. I don’t understand which keys I should be using. Should my array be a collection of NSDictionary objects instead, so that I can have a key named “myObject” rather than storing the values directly?

I’m very new to bindings, so it’s a bit of a struggle. Please help.

  • 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-20T01:16:25+00:00Added an answer on May 20, 2026 at 1:16 am

    I sorted it out. It should go like this:

    1) NSArrayController:

    Bind to → MyWindowController (File’s Owner)

    Model Key Path → myArrayWithObjects

    2) NSCollectionView:

    Bind to → NSArrayController

    Controller Key → arrangedObjects

    3) Now, to get that value from the array into the custom NSView, you’d need to override the following method in your NSCollectionViewItem subclass:

    - (void)setRepresentedObject:(id)object
    {
        [super setRepresentedObject:object];
    
        // e.g. [self.view setMyProperty:object];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a window which has a custom NSView and has a bottom bar
I have an NSStatusItem that has an NSMenuItem which contains a custom NSView. this
I have a custom NSView which contains a subview—for the purposes of solving this
I have a custom NSView object with a retained property named bgColor. I override
I have a custom NSView which used to get created in a NIB and
I've got a custom NSView subclass which I want to have rounded corners. I
I have made a custom NSView and have implemented the keyDown: method. However, when
I have custom event that has several different subscribers who will all use the
Here's the scenario - I have created a custom NSView subclass, and the implementation
What I want to do I have a circular custom NSView subclass, and I

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.