controlling windows
controlling windows
- Subject: controlling windows
- From: Peter Sichel <email@hidden>
- Date: Fri, 21 Sep 2001 14:39:53 -0400
I'm having trouble opening windows as key and restoring
their position.
I have an app with several windows each with its own nib file.
From the window menu, I invoke a simple target object to load
and display the window using a subclass of NSWindowController
like this:
- (IBAction)showWindow:(id)sender
{
pingWindowController = [[PingWindowController alloc]
initWithWindowNibName:@"Ping" owner:sender];
[pingWindowController setWindowFrameAutosaveName:@"Ping"];
[pingWindowController showWindow:sender];
[[pingWindowController window] makeKeyAndOrderFront:sender];
}
The window does not acquire input focus until I click in it.
What could be preventing this?
How do I save and restore the window position?
[the window is not resize able].
- Peter
--