[NSApp runModalForWindow:aWindow];
[NSApp runModalForWindow:aWindow];
- Subject: [NSApp runModalForWindow:aWindow];
- From: Tae-Won Ha <email@hidden>
- Date: Wed, 24 Oct 2001 21:46:43 +0200
Hi...
I've got a question regarding the runModalForWindow of NSApplication
class.
I have a Nib-file with a NSPanel which is controlled by a
NSWindowController.
Here my code:
NSDocument-subclass:
makeWindowControllers-method
{
...
windowController = [init stuff];
[self addWindowController:windowController]
result = [NSApp runModalForWindow:[windowController window]];
[windowController release];
...
}
NSWindowController-subclass:
okAction-IBAction
{
...
if(something is right)
{
[NSApp stopModal];
anotherWindowController = [init stuff];
[[self document] addWindowController:anotherWindowController];
[[anotherWindowController window] makeKeyAndOrderFront:self];
[self close];
}
}
The window of anotherWindowController shows up, but all of its window
control elements, e.g. close button, toolbar toggle button and so on,
are disabled. The toolbar items does not respond, although they are not
disabled. It does not respond to Close menu item, too.
How can I fix that???
Tae-Won Ha
http://www.taewon.de/
email@hidden
=)