Re: Modal session requires modal window
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