Modal session requires modal window
Modal session requires modal window
- Subject: Modal session requires modal window
- From: Michael Hanna <email@hidden>
- Date: Thu, 14 Oct 2004 21:45:11 -0400
Opening a sheet with this code:
<x-tad-smaller>-(</x-tad-smaller><x-tad-smaller>void</x-tad-smaller><x-tad-smaller>)raiseNagWindow
{
[NSApp beginSheet:nagWindow modalForWindow:myWindow modalDelegate:</x-tad-smaller><x-tad-smaller>self</x-tad-smaller><x-tad-smaller> didEndSelector:</x-tad-smaller><x-tad-smaller>@selector</x-tad-smaller><x-tad-smaller>(sheetDidEnd:returnCode:contextInfo:) contextInfo:</x-tad-smaller><x-tad-smaller>nil</x-tad-smaller><x-tad-smaller>];
}
causes a 'Modal session requires modal window' runtime error.
however the same code(pretty much) causes no error:
-(</x-tad-smaller><x-tad-smaller>void</x-tad-smaller><x-tad-smaller>)raiseExpireWindow
{
[NSApp beginSheet:expireWindow modalForWindow:myWindow modalDelegate:</x-tad-smaller><x-tad-smaller>self</x-tad-smaller><x-tad-smaller> didEndSelector:</x-tad-smaller><x-tad-smaller>@selector</x-tad-smaller><x-tad-smaller>(sheetDidEnd:returnCode:contextInfo:) contextInfo:</x-tad-smaller><x-tad-smaller>nil</x-tad-smaller><x-tad-smaller>];
}
they both use this method:
-(</x-tad-smaller><x-tad-smaller>void</x-tad-smaller><x-tad-smaller>)sheetDidEnd:(NSWindow *)sheetDidEnd
returnCode:(</x-tad-smaller><x-tad-smaller>int</x-tad-smaller><x-tad-smaller>)returnCode
contextInfo:(</x-tad-smaller><x-tad-smaller>void</x-tad-smaller><x-tad-smaller> *)contextInfo
{
NSLog(</x-tad-smaller><x-tad-smaller>@"Sheet did end, return code: %d"</x-tad-smaller><x-tad-smaller>, returnCode);
}
they also use
- (</x-tad-smaller><x-tad-smaller>id</x-tad-smaller><x-tad-smaller>)sender
- (</x-tad-smaller><x-tad-smaller>id</x-tad-smaller><x-tad-smaller>)sender
respectively.
any ideas what's causing the 'Modal session requires modal window' error when opening the nag window?
Michael</x-tad-smaller> _______________________________________________
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