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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T12:18:28+00:00 2026-05-20T12:18:28+00:00

Hey guys, I thought this would be an incredibly simple thing to do, but

  • 0

Hey guys,
I thought this would be an incredibly simple thing to do, but it’s proving trickier than I thought.

I want to be able to show an NSPanel that displays a circular progress bar and the name of the thing that’s being processed.

So, I made an NSPanel containing those controls in IB, then I created a subclass of NSWindowController. Created outlets for the controls and linked those up.

However, when I try using this code to display the NSPanel, nothing happens:

        [[[self controller] msgSubject] setValue:[msg subject]];
        [[[self controller] window] setLevel:NSFloatingWindowLevel];
        [[self controller] showWindow:self];
        [[[self controller] window] makeKeyAndOrderFront:self];

[self controller] is a method that lazily instantiates the NSWindowController subclass. I tried adding the call to makeKeyAndOrderFront: in vain, but the panel still isn’t popping up.

I tried debugging and what I found is that when -initWithWindow: is called, the NSWindow that’s passed in as an argument has all zeroed out instance variables, leading me to believe there’s some sort of IB linking issue going on here.

Any ideas? I’m guessing I missed something really obvious, but I can’t for the life of me figure out what it is.

  • 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-20T12:18:29+00:00Added an answer on May 20, 2026 at 12:18 pm

    Please post the contents of the [self controller] method so we can begin to see exactly how you’re creating and using the NSWindowController subclass. Are you creating it using the initWithWindow: method directly, or is that method (which is the designated initializer) being called indirectly from one of the other init methods? If you are calling it directly, that doesn’t really make sense to me as you said you already created the window in nib file itself. If on the other hand, it’s being called indirectly by -initWithWindowNibName:, then it would help to see that code.

    NSWindowController‘s are primarily used/set up in 2 different ways. One way is to create an NSWindow programmatically, and then create the NSWindowController subclass and feed that window in as the window the controller will manage. The second, and more frequently used method, is to create a nib file that houses the window, which is what it sounds like you’re trying to do. In this method, you generally use the -initWithWindowNibName: initializer. As long as you pass in the proper nib name (generally without the “.nib” part of the filename), and that nib file can be properly found at runtime, and the file’s owner in this nib file is set to be the custom NSWindowController subclass, and the window outlet of this subclass is properly hooked up to your window, then you should be all set.

    Might want to double-check to make sure that the nib file you want to load is actually in the app bundle. (I’ve occasionally forgotten to add it to the target so at runtime the nib file couldn’t be located and so the -initWithWindow: method would always show a nil parameter).

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

Sidebar

Related Questions

Hey guys i wrote a quick test. I want delete to call deleteMe which
Hey guys, I'm having trouble understanding a Rails construct. I'm using Rails 3 but
Hey guys, So I have this report that I am grouping into different age
hey guys m having this wierd exception of cast though my datatypes are correct
Hey guys, PHP and MySQL newguy here. Wrote this php file which display the
Hey guys! First of all, I know this kind of stuff is quite shitty,
hey guys, i'm working on a very simple breadcrumb-path solution, however i have one
hey guys, i'm getting an exception on the following inner exception: {Value cannot be
Hey so what I want to do is snag the content for the first
Hey all, my Computational Science course this semester is entirely in Java. I was

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.