Problem with beinSheet, endSheet
Problem with beinSheet, endSheet
- Subject: Problem with beinSheet, endSheet
- From: j o a r <email@hidden>
- Date: Mon, 16 Jul 2001 17:47:39 +0200
Hello,
I think that I have a "colission" between two sheets. After the first
sheet ends, but before the second opens (right before) I get this:
=========================================================
Jul 16 17:19:56 myApplication[1393] *** Assertion failure in
-[NSApplication
_commonBeginModalSessionForWindow:relativeToWindow:modalDelegate:didEndSelector:
contextInfo:], NSApplication.m:2236
Jul 16 17:19:56 myApplication 1393] Modal session requires modal window
=========================================================
...and the second sheet never appears. The execution halts where I call
beginSheet for the second sheet.
The problem seems simple - I need to call endSheet on the first sheet
before opening the second sheet, right? But I am pretty sure that I have
called endSheet already.
When the button is pressed to dismiss the first sheet, I call this
method:
=========================================================
- (IBAction)defaultOKButton:(id)sender
{
{
[[sender window] orderOut:nil];
[NSApp endSheet:[sender window] returnCode:NSAlertDefaultReturn];
}
}
=========================================================
And in my "didEndSelector:" I call a method that opens the second sheet.
Sooo... What could I be doing wrong? Would I have to wait some time
after closing the first sheet before opening the second sheet?
Regards,
j o a r