Re: NSWindowController
Re: NSWindowController
- Subject: Re: NSWindowController
- From: Graham Cox <email@hidden>
- Date: Tue, 16 Sep 2008 13:22:46 +1000
On 16 Sep 2008, at 11:55 am, Chris Idou wrote:
- (IBAction)preferences:(id)sender {
if (nil == preferencesController) {
preferencesController = [[NSWindowController alloc]
initWithWindowNibName:@"Preferences" owner:self];
}
[preferencesController showWindow:self];
}
In the NIB, the file's owner is a NSWindowController, and I have
linked its window outlet to the Window.
I'm not sure if it's the cause of your problem, but you're using
initWithWindowNibName:owner:, and passing 'self' as the owner. Yet you
say that File's Owner is the Window Controller. It's not clear what
'self' is in this snippet, but it appears not to be the window
controller but some higher-level object.
You should probably just change that to -initWithWindowNibName: so
that the controller itself is the owner.
hth,
Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden