modal over modal problem
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