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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T08:29:31+00:00 2026-05-16T08:29:31+00:00

In the Implementation Overview section of the NSPersistentDocument Core Data Tutorial it says: …

  • 0

In the Implementation Overview section of the NSPersistentDocument Core Data Tutorial it says:

  1. …
  2. One issue with creating the new top-level object in the nib file is that when you use bindings an object retains other objects to which it is bound. This means that bindings must be broken to ensure there are no retain cycles when a document is closed. Moreover, since the nib file the new controller owns contains top level objects and the controller’s class does not inherit from NSWindowController, you need to release the top level objects when the window is closed.

Why not just have the controller inherit from NSWindowController? Is there a reason this would not work? Or was this just a matter of style?

  • 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-16T08:29:32+00:00Added an answer on May 16, 2026 at 8:29 am

    As commented below, I did get this to work with an NSWindowController subclass, and it does seem to save quite a bit of code.

    Here is my subclass header:

    #import <Cocoa/Cocoa.h>
    
    @interface NewAccountSheetController : NSWindowController {
    @private
        BOOL isValidForInsert;
        NSManagedObjectContext * managedObjectContext;
        NSObjectController * objectController;
        NSObjectController * targetController;
    }
    
    @property (setter=setValidForInsert:) BOOL isValidForInsert;
    @property (nonatomic, retain) IBOutlet NSManagedObjectContext * managedObjectContext;
    @property (nonatomic, retain) IBOutlet NSObjectController * objectController;
    @property (nonatomic, retain) IBOutlet NSObjectController * targetController;
    
    - (void)beginSheetForWindow:(NSWindow *)window;
    
    - (IBAction)endSheet:(id)sender;
    
    @end
    

    And here is the implementation in a Pastebin.

    I have no good idea how to describe the required bindings, etc. but if you’re familiar with the above tutorial they should be straightforward to extrapolate… I think. 🙂

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

Sidebar

Ask A Question

Stats

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

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

    • 7 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Your question doesn't have a lot of info - no… May 16, 2026 at 6:46 pm
  • Editorial Team
    Editorial Team added an answer The idea is not to stop the users from entering… May 16, 2026 at 6:46 pm
  • Editorial Team
    Editorial Team added an answer I'm not sure if I understand what you're trying to… May 16, 2026 at 6:46 pm

Trending Tags

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

Top Members

Related Questions

Here's a overview of my workflow implementation: GUI thread starts worker thread worker thread
I looked into the implementation of Array.Resize() and noticed that a new array is
We have an implementation for an Ultrasound machine application current where the Ultrasound object
Overview I want to be able to modify request parameters and content to 3rd
I am trying to use the hessian j2me implementation @ http://hessian.caucho.com/ using java me
Whether we're maintaining unfamiliar code or checking out the implementation details of an Apache
I'm trying to understand my options for calling a C# library implementation from unmanaged
I've got an interface inheritance issue that has been vexing me for some time.
My implementation of a getHandler method, which is defined on a Java interface, has
Every implementation I've come across of perlin noise generation has been for the generation

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.