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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:54:17+00:00 2026-06-02T02:54:17+00:00

Ok, as simple and silly as that may seem, this is my scenario :

  • 0

Ok, as simple and silly as that may seem, this is my scenario :

  • The application window (there is just ONE main window) is minimized
  • The user clicks something on the dock menu
  • We want to bring that main window back

Simple?

Not quite.

I’ve tried accessing my main window via :

  • [[NSApplication sharedApplication] mainWindow]
  • [[NSApplication sharedApplication] windows]

and then sending a makeKeyAndOrderFront: message but it’s simply NOT showing up.

I’ve even tried showing all windows (yep, it still sees as “windows” one-or-two (hidden) sheets I’m using…), but still nothing.

Could you suggest a way, I could finally show that window, WITHOUT having to set an outlet anywhere?

I don’t know; I’m probably too tired to notice, but this thing is almost nerve-wrecking…

  • 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-06-02T02:54:18+00:00Added an answer on June 2, 2026 at 2:54 am

    You can un-minimize a window like so:

    if([aWindow isMiniaturized])
    {
       [aWindow deminiaturize:self];
    }
    

    However, the problem is that the window will lose main status when it is minimized, so you’ll need some other way of identifying the window.

    Why can’t you just use an outlet?

    You can make the app un-minimize all of its minimized windows like so:

    for(NSWindow* win in [NSApp windows])
    {
        if([win isMiniaturized])
        {
            [win deminiaturize:self];
        }
    }
    

    When the app launches, you could store a reference to the main window and register for the NSWindowDidMiniaturizeNotification. That will tell you when the main window minimizes, which might also help you.

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

Sidebar

Related Questions

This may seem a very silly question. Consider this: I have a simple Boolean
This may seem like a silly question. I have images that are reused on
This may seem like a silly question, but I've looked high and low for
This may seem a silly question, but having been pondering it for a few
This may seem like a silly question. I am running a neural network through
This may be a bit silly question, but I just started doing pretty things
Ok so this maybe a simple/silly question but I don't know so here goes:
This might sound silly, but my umbraco 5.1 application (after upgrading from 5.0) simply
This may be a silly question but... Say you have a sentence like: The
I have a GUI application that needs to do something simple in the background

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.