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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T07:18:16+00:00 2026-05-14T07:18:16+00:00

I have a custom NSWindowController subclass that loads a NIB file during initialization like

  • 0

I have a custom NSWindowController subclass that loads a NIB file during initialization like this:

self = [super initWithNibNamed:@"myNib"];
if (self != nil) {
    [self window];
}

The nib contains some custom views and some other controls. The NSWindowController is the file’s owner and at least one of the views even binds to it.

Simply, what do I have to do to close and release that window? I spend the whole day trying to figure that out and I am still clueless.

  • 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-14T07:18:16+00:00Added an answer on May 14, 2026 at 7:18 am

    You don’t unload a nib; “loading” it is simply unarchiving the objects that are archived within it. That’s not a state that persists indefinitely; it’s a momentary action. Once you’ve unarchived the object, it doesn’t matter where it came from.

    If you were not in a window controller, then:

    • To close a window, you would send it a close message.
    • To close and release a window, you would need to either have its releasedWhenClosed property turned on (you can do this in IB) before you send it a close message, or send it a release message after the close message.

    But since you are in a window controller, just send yourself a close message.

    See also “Window Closing Behavior” in the Document-Based Applications Overview (document-based apps being the main users of window controllers).

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

Sidebar

Related Questions

I have custom exceptions in my django project that look like this: class CustomFooError(Exception):
I have custom component that I can place in my layout file (XML) for
I have custom assembly that is loaded on runtime. at this point i have
I have custom button, with an image that I'd like to shift down within
I have custom SPlist with some fields that I'd like to bind to a
I have custom checkstyle checks file (called checks.xml), and I'm trying to use that
I have custom validators and filters that I have created that I would like
I have custom UITableViewCell . It contains UITextLabel . When I press this cell
I have custom validation rule: public function customRule($check) { } Inside this rule I
I have custom classes that I currently instantiate within App.xaml as resources. I want

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.