• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
modal over modal problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

modal over modal problem


  • Subject: modal over modal problem
  • From: Luc Vandal <email@hidden>
  • Date: Mon, 11 Apr 2005 14:46:23 -0400

Hi,

I have a modal window that displays another modal window:

int returnCode;
returnCode = [NSApp runModalForWindow:dlgBrowse];
[dlgBrowse orderOut:self];
[NSApp stopModal];


The problem is that when I click on Ok or Cancel on the 2nd window (which was opened by the 1st modal window), stopModalWithCode will close both windows at the same time. So I tried this:

- (void)displayBrowseDlg
{

m_dlgBrowseSession = [NSApp beginModalSessionForWindow:dlgBrowse];
[NSApp runModalSession:m_dlgBrowseSession];

}

- (id)sender
{
[NSApp endModalSession:m_dlgBrowseSession];
[dlgBrowse orderOut:self];
}


Now the problem is that if I click on Ok or Cancel, I get this beep sound and cannot seem to be able to click on the buttons. If I hit enter or escape the window does dissapear.

Is there a proper way to handle many modal dialogs?

Thanks!

Luc
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: modal over modal problem
      • From: Steven Kramer <email@hidden>
  • Prev by Date: Re: Filtering the Contents of an Array Controller
  • Next by Date: Re: NSBezierPath geometry question...
  • Previous by thread: Re: Filtering the Contents of an Array Controller
  • Next by thread: Re: modal over modal problem
  • Index(es):
    • Date
    • Thread