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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:48:41+00:00 2026-05-24T16:48:41+00:00

I have a Mac window based application using CoreData and Cocoa bindings to bind

  • 0

I have a Mac window based application using CoreData and Cocoa bindings to bind a CoreData entity to an NSArrayController for displaying in a NSCollectionView.

I have a property on my controller (which is set as the views Files Owner) called managedObjectConext. In the awakeFromNib method I have tried setting the managedObjectContext (MOC) property to:

managedObjectContext = [(MyApplicationAppDelegate *)[[NSApplication sharedApplication] delegate] managedObjectContext];
managedObjectContext = [[NSApp delegate] managedObjectContext];

I have also configured the NSArrayControllers MOC bindings to the ‘Files Owner’ MOC property and attribute bindings to that of my CoreData entity.

However everytime I run the application just before its about to do the binding I get the follwowing error message:

Cocoa Cannot perform operation without a managed object context

I have logged in the console to check that the MOC is not nil, which I presume it isn’t as this is the NSLog from the MOC object: myMoc = NSManagedObjectContext: 0x10052f9c0

I am totally stumped now and frustrated that something that should be so simple has taken up so much of my time! Any help would be greatly appreciated.

  • 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-24T16:48:42+00:00Added an answer on May 24, 2026 at 4:48 pm

    Bindings are defined in the nib, so if the nib doesn’t know about the managedObjectContext property of the controller, then the bindings don’t either.

    In the interface editor, you need to bind the managedObjectContext key in the array controller’s bindings panel to the specific context.

    The easiest way to do this for a one context app, is to label the managedObjectContext property in the app delegate as an IBOutlet so that it shows up in the interface editor. Then just bind it directly from the array controller’s panel.

    Honestly, I don’t know why they don’t do that in the Xcode template itself. You end up doing it so often.

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

Sidebar

Related Questions

I have a Java Swing application, developed on Mac OS X 10.5 using Java
I'm new to Windows development and I have a question. I'm using a Mac
I have just installed PostgreSQL 8.3.4 on Mac OS X 10.5 (using ports), but
I have a Java GUI-based application that writes some diagnostic messages to System.out and
I maintain a cross platform application, based on PyQt that runs on linux mac
Does anyone have experience of implementing key based product activation inside a QT application?
I have Perl on Mac, Windows and Ubuntu. How can I tell from within
I have a mac with a custom PHP 5 install that built from about
I have multiple installations of apache on my Mac OS X 10.5 and would
I have an iphone simulator running on my Mac. I have a .ipa file,

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.