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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:26:29+00:00 2026-05-23T13:26:29+00:00

Im pretty sure the answer must be quite easy, but for some reason I

  • 0

Im pretty sure the answer must be quite easy, but for some reason I can’t get it to work!

I have a window, and this code:

[someWindow setHidesOnDeactivate:YES];

I have a status item, and the following code

- (void)openWindow{
   if ([someWindow isVisible]) {
         NSLog(@"CLOSING");
         [lyricWindow close];
   }else {
          [someWindow makeKeyAndOrderFront:nil];
         NSLog(@"SHOWING");
   }

}

This worked when I closed the window and wanted to open it again. Now that I’ve implemented the hides of deactivate I am lost as to what I need to do! I’ve tried all sorts of things… I want the window to show again and the window to become active when I click the status item! I think thats my problem.

How can I make the window active when I click on a status item?

I get the following in the log:

CLOSING SHOWING CLOSING SHOWING

Closing is first regardless if the window is hidden or not, which is rather intriguing, because id guess isVisible would return false if the window has been hidden. Anyhow, I get no window. How can I unhide the window?

Thanks!

  • 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-23T13:26:29+00:00Added an answer on May 23, 2026 at 1:26 pm

    I had this same problem where I couldn’t get a window to re-show after it was hidden from deactivation. In my case, I was showing a NSPanel (subclass of NSWindow) when a NSStatusItem was pressed.

    The following code finally got my NSPanel to re-show up:

    [NSApp arrangeInFront:sender];
    [myWindow makeKeyAndOrderFront:sender];
    [NSApp activateIgnoringOtherApps:YES];
    

    I’m pretty sure ‘activateIgnoringOtherApps’ is the key here. For me, it’s not ideal because it takes focus away from the user’s current application.

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

Sidebar

Related Questions

Pretty sure there is an easy answer to this, but just can't find the
I'm pretty sure there's some quick and easy error in this code but somehow
I'm sure there must be an easy answer to this but everything I've googled
I'm pretty sure the answer to this is 'yes', but just in case: If
I am pretty sure there is and answer out there.. But I can't seem
I'm pretty sure this will be a really easy answer for you jQuery whizzes,
OK, I'm pretty sure I know the answer to this but just in case.
I'm pretty sure this can't be done in Oracle, but I'd love to be
I'm pretty sure the answer is you can't use templates, you have to use
I'm pretty sure I know the answer to this (that you can't do it),

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.