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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:13:24+00:00 2026-06-05T02:13:24+00:00

I’m running a modal window in my application, which works fine. The problem however

  • 0

I’m running a modal window in my application, which works fine. The problem however seems to be dismissing the window.

While the window closes, it takes at least 20 seconds for the application to continue (I show the modal window at startup), but it will continue instantly if I click on its dock icon.

Here’s how I close the modal window:

[NSApp stopModal];
[updaterWindow orderOut:self];
[updaterWindow close]; 

I’ve tried various things to get the Application to continue faster, such as manually switching to the main run loop and speaking to the main window directly (asking it to become the key window), which all did not work. Same as before, 20 seconds wait or instant load when clicking on the dock icon.

What can cause something like this? I’m really baffled.

Edit:

My modal window is actually created in a really simple way. I run my window as modal:

[NSApp runModalForWindow:updaterWindow];

When I am done with things, I close it:

[NSApp stopModal];
[updaterWindow orderOut:self];
[updaterWindow close];

The window goes away, but it needs a click to the dock icon or anywhere on the screen for the app to continue.

  • 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-05T02:13:25+00:00Added an answer on June 5, 2026 at 2:13 am

    I’m doing something similar in my app at the moment: I have an IBAction method that calls the modal window:

    -(IBAction)showMyModalWindow:(id)sender {
        [theModalWindow makeKeyWindow];
        NSInteger retVal = [NSApp runModalForWindow:theModalWindow];
        [theModalWindow close];
        //continue and do somethin according the value in retVal
        [[NSApplication sharedApplication] activateIgnoringOtherApps:YES];
    }
    

    In this case theModalWindow is in it’s own nib file has an NSObject in it that deals with the ok and cancel button to dismiss theWindow, by way of example here’s the cancel button callback:

    -(IBAction)cancelButton:(id)sender
    {
        [NSApp stopModalWithCode:errAuthorizationCanceled];
    }
    

    The last line in showMyModalWindow: method seems to be what’s needed in my case by sending the app forward… Hope that’s of some use!

    Todd.

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

Sidebar

Related Questions

I am currently running into a problem where an element is coming back from
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti

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.