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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:44:14+00:00 2026-06-16T02:44:14+00:00

I am developing a small and simple status menu application. There is a menu

  • 0

I am developing a small and simple status menu application.
There is a menu and when the user clicks on it, a HUD window (NSPanel) should appear.
This is how I show the panel:

[hudWindow makeKeyAndOrderFront: self]; 

This is how I dismiss the window:

[hudWindow orderOut: nil];

So that’s the events chain:

  1. When the app starts I dismiss the window;
  2. Then the user (that’s me :-)) clicks on the menu item and makes the panel appear;
  3. Then I click on the x and close the panel;
  4. Then I click again on the menu item and the window doesn’t appear again.

It doesn’t appear again probably because it gets deallocated, and I have put a weak storage, otherwise with __unsafe_unretained it would crash at the second launch.
So I’m guessing if there’s a way to avoid deallocating the window when the user clicks on it.
I have tried with a strong storage but this case at the second launch I’m unable to close it again and that’s a problem.
There are many menu status applications that are able to display a window without that the user can “kill” it, I would make something of similar.

  • 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-16T02:44:16+00:00Added an answer on June 16, 2026 at 2:44 am

    You should uncheck the “Release When Closed” checkbox in IB (or done the equivalent in code). That box is checked by default for panels.

    Using a strong pointer probably doesn’t work because the releasedWhenClosed setting overrides that. Having a strong pointer just means that the retain count will be at least one, but that doesn’t prevent the system from explicitly sending a release message to the panel.

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

Sidebar

Related Questions

I am developing a small, internal-use only web application. Given its simple nature and
I'm developing a small application that, given a user name, it gets the user
I know this sounds a little bizarre, but there is a very simple application
Im developing a small web aplication, used in a shared computer. When the user
I am developing a small application and for that authentication is needed. That I'm
I'm developing a small application using Blend, basically what I have in my application
I'm developing a small application that reads data from a database and displys it
I am developing a small application in Java. I am using Java2D Library for
I'm currently developing a small, JavaScript based drawing application on iPad. I've simply wrapped
I am new to nhibernate. I am developing a small c# application, using the

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.