RunModalForWindow
RunModalForWindow
- Subject: RunModalForWindow
- From: Tae-Won Ha <email@hidden>
- Date: Mon, 21 Jan 2002 23:19:58 +0100
I want to run a panel modal. I instantiated a object in MainMenu.nib and
created a new nib for the panel with its window controller.
I have the following code:
- (IBAction)okAction:(id)sender
{
MyWindowController *controller = [[[MyWindowController alloc] init]
autorelease];
int runResult = [NSApp runModalForWindow:[controller window]];
if(NSRunAbortedResponse == runResult)
NSLog(@"Closed");
}
However the system says this:
2002-01-21 23:16:56.578 modal window test[398] *** Assertion failure in
-[NSApplication
_commonBeginModalSessionForWindow:relativeToWindow:modalDelegate:didEndSelec
tor:contextInfo:], NSApplication.m:2306
2002-01-21 23:16:56.585 modal window test[398] Modal session requires modal
window
What's wrong?
--
Tae. =)