• 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
Problem with beinSheet, endSheet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Problem with beinSheet, endSheet [solution]
      • From: j o a r <email@hidden>
    • Re: Problem with beinSheet, endSheet
      • From: Markus Hitter <email@hidden>
  • Prev by Date: Windows background color
  • Next by Date: Currency Converter sample [rateField selectText:self]; doesn't work...?
  • Previous by thread: Re: Windows background color
  • Next by thread: Re: Problem with beinSheet, endSheet
  • Index(es):
    • Date
    • Thread