• 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
Re: Modal session requires modal window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Modal session requires modal window


  • Subject: Re: Modal session requires modal window
  • From: j o a r <email@hidden>
  • Date: Fri, 15 Oct 2004 09:27:22 +0200

Either "nagWindow" or "myWindow" is probably *nil*, or otherwise invalid (off screen?) when you call that method.

j o a r

On 2004-10-15, at 03.45, Michael Hanna wrote:

Opening a sheet with this code:

-(void)raiseNagWindow
{
[NSApp beginSheet:nagWindow modalForWindow:myWindow modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo:nil];
}

causes a 'Modal session requires modal window' runtime error.

however the same code(pretty much) causes no error:

-(void)raiseExpireWindow
{

[NSApp beginSheet:expireWindow modalForWindow:myWindow modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo:nil];

}


they both use this method:

-(void)sheetDidEnd:(NSWindow *)sheetDidEnd
returnCode:(int)returnCode
contextInfo:(void *)contextInfo
{
NSLog(@"Sheet did end, return code: %d", returnCode);
}

they also use
- (IBAction)endNagWindow:(id)sender
- (IBAction)endExpireWindow:(id)sender

respectively.

any ideas what's causing the 'Modal session requires modal window' error when opening the nag window?

_______________________________________________
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
References: 
 >Modal session requires modal window (From: Michael Hanna <email@hidden>)

  • Prev by Date: Re: IPAddressFormatter?
  • Next by Date: NSLock vs. NSRecursiveLock
  • Previous by thread: Modal session requires modal window
  • Next by thread: supplying default values to popup in table
  • Index(es):
    • Date
    • Thread