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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:04:24+00:00 2026-05-11T03:04:24+00:00

I’m having some problems displaying the contents of one NSArrayController in two windows defined

  • 0

I’m having some problems displaying the contents of one NSArrayController in two windows defined in different XIBs.

In my main window (in MainMenu.xib), I have an NSTableView which is bound to an NSArrayController

In my second XIB, I have another window that contains an NSTableView. I created a new NSArrayController, and bound the table to the contents of that NSArrayController.

Both NSArrayControllers are bound to the exact same NSArray.

Everything is fine at first, but the problem is that if an object is added to the array using the NSArrayController in the main window, the secondary window’s view of the data isn’t updated. This is most likely because it doesn’t know that it needs to update itself, since its NSArrayController wasn’t used to add the new object.

What I would like to do is use the exact same instance of NSArrayController in both windows. This way if an object is added to the array, both views will be notified of the change.

The problem is that I can’t figure out how to do this in Interface Builder. I can’t bind an NSArrayController to another NSArrayController (I get a runtime error indicating that it can only be bound to an NSArray). Connecting the NSArrayController to the NSArrayController member of File’s Owner won’t help either, since that will just wipe out the NSArrayController that I want it to use.

I guess I could set the bindings up myself in code, but it seems like it would be better to use Interface Builder if possible. Is there a way to do this in Interface Builder, or maybe a better way to set this up all together?

Update: In response to Chuck’s answer and comments, I tried the following: -Bound the Table Content of my NSTableView to the arrangedObjects of the NSArrayController member (if I used the NSArrayController itself, an error appeared in the log: ‘[NSArrayController count]: unrecognized selector sent to instance’) -Bound each column in the table to File’s Owner, with a Model Key Path of arrayController.arrangedObjects.propertyName

This still did not result in the contents of the table getting updates. I think this is because I am binding to the arrangedObjects of the NSArrayController, rather than to the NSArrayController itself. But, if I bind to the NSArrayController directly, that gives me errors.

Normally, I would select my NSArrayController from the ‘Bind to’ ComboBox, use arrangedObjects as the Controller Key, and the property itself as the Model Key Path. I’m not sure how to do the equivalent of that in this case – if I can at all.

Did I do something wrong in the process above?

  • 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. 2026-05-11T03:04:25+00:00Added an answer on May 11, 2026 at 3:04 am

    The best option that I’ve been able to come up with is to notify the second NSArrayController that the array it’s managing has changed by calling rearrangeObjects: on it. That seems clunky, but it works.

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

Sidebar

Ask A Question

Stats

  • Questions 183k
  • Answers 183k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The double-tap-for-iPod behaviour, if people are using the defaults (most… May 12, 2026 at 4:36 pm
  • Editorial Team
    Editorial Team added an answer http://support.softartisans.com/kbview.aspx?ID=1318 Turns out it was an issue with the vendor… May 12, 2026 at 4:36 pm
  • Editorial Team
    Editorial Team added an answer Because you're seeing an integer overflow in the arguments. According… May 12, 2026 at 4:36 pm

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
In order to apply a triggered animation to all ToolTip s in my app,
I have a French site that I want to parse, but am running into
I have text I am displaying in SIlverlight that is coming from a CMS

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.